home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-07-17 | 12.5 KB | [TEXT/MMCC] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Mon Jul 17 17:21:31 1995, modified Mon Jul 17 17:21:31 1995, creator 'MMCC', type ASCII, 12117 bytes "eventHandler.c" , at 0x2fd5 456 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MMCC] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0e 65 76 65 6e 74 48 | 61 6e 64 6c 65 72 2e 63 |..eventH|andler.c|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 01 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 2f 55 00 | 00 01 c8 ac 30 84 db ac |...../U.|....0...|
|00000060| 30 84 db 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |0.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 b6 43 00 00 |........|.....C..|
|00000080| 2f 2a 09 4d 50 57 20 43 | 20 41 70 70 6c 69 63 61 |/*.MPW C| Applica|
|00000090| 74 69 6f 6e 20 73 6b 65 | 6c 65 74 6f 6e 20 62 79 |tion ske|leton by|
|000000a0| 20 44 65 61 6e 20 59 75 | 09 2a 2f 0d 2f 2a 09 45 | Dean Yu|.*/./*.E|
|000000b0| 76 65 6e 74 20 68 61 6e | 64 6c 69 6e 67 20 72 6f |vent han|dling ro|
|000000c0| 75 74 69 6e 65 73 09 09 | 09 09 09 2a 2f 0d 0d 2f |utines..|...*/../|
|000000d0| 2f 20 49 66 20 74 68 65 | 20 69 6e 74 65 72 66 61 |/ If the| interfa|
|000000e0| 63 65 73 20 61 72 65 6e | 27 74 20 69 6e 63 6c 75 |ces aren|'t inclu|
|000000f0| 64 65 64 20 79 65 74 2c | 20 64 6f 20 74 68 65 20 |ded yet,| do the |
|00000100| 73 74 61 6e 64 61 72 64 | 20 69 6e 63 6c 75 64 65 |standard| include|
|00000110| 73 2e 20 4f 74 68 65 72 | 77 69 73 65 2c 20 70 72 |s. Other|wise, pr|
|00000120| 65 63 6f 6d 70 69 6c 65 | 64 20 68 65 61 64 65 72 |ecompile|d header|
|00000130| 73 0d 2f 2f 20 68 61 76 | 65 20 62 65 65 6e 20 6c |s.// hav|e been l|
|00000140| 6f 61 64 65 64 20 61 6c | 72 65 61 64 79 2c 20 74 |oaded al|ready, t|
|00000150| 68 61 6e 6b 20 79 6f 75 | 20 76 65 72 79 20 6d 75 |hank you| very mu|
|00000160| 63 68 0d 23 69 66 6e 64 | 65 66 20 5f 5f 54 59 50 |ch.#ifnd|ef __TYP|
|00000170| 45 53 5f 5f 0d 09 23 69 | 6e 63 6c 75 64 65 20 3c |ES__..#i|nclude <|
|00000180| 54 79 70 65 73 2e 68 3e | 0d 09 23 69 6e 63 6c 75 |Types.h>|..#inclu|
|00000190| 64 65 20 3c 41 70 70 6c | 65 45 76 65 6e 74 73 2e |de <Appl|eEvents.|
|000001a0| 68 3e 0d 09 23 69 6e 63 | 6c 75 64 65 20 3c 44 65 |h>..#inc|lude <De|
|000001b0| 73 6b 2e 68 3e 0d 09 23 | 69 6e 63 6c 75 64 65 20 |sk.h>..#|include |
|000001c0| 3c 44 69 61 6c 6f 67 73 | 2e 68 3e 0d 09 23 69 6e |<Dialogs|.h>..#in|
|000001d0| 63 6c 75 64 65 20 3c 45 | 64 69 74 69 6f 6e 73 2e |clude <E|ditions.|
|000001e0| 68 3e 0d 09 23 69 6e 63 | 6c 75 64 65 20 3c 45 76 |h>..#inc|lude <Ev|
|000001f0| 65 6e 74 73 2e 68 3e 0d | 09 23 69 6e 63 6c 75 64 |ents.h>.|.#includ|
|00000200| 65 20 3c 4d 65 6e 75 73 | 2e 68 3e 0d 09 23 69 6e |e <Menus|.h>..#in|
|00000210| 63 6c 75 64 65 20 3c 53 | 65 67 4c 6f 61 64 2e 68 |clude <S|egLoad.h|
|00000220| 3e 0d 09 23 69 6e 63 6c | 75 64 65 20 3c 54 65 78 |>..#incl|ude <Tex|
|00000230| 74 55 74 69 6c 73 2e 68 | 3e 0d 09 23 69 6e 63 6c |tUtils.h|>..#incl|
|00000240| 75 64 65 20 3c 54 6f 6f | 6c 55 74 69 6c 73 2e 68 |ude <Too|lUtils.h|
|00000250| 3e 0d 09 23 69 6e 63 6c | 75 64 65 20 3c 57 69 6e |>..#incl|ude <Win|
|00000260| 64 6f 77 73 2e 68 3e 0d | 23 65 6e 64 69 66 0d 0d |dows.h>.|#endif..|
|00000270| 2f 2f 20 4e 6f 74 20 69 | 6e 20 4d 65 74 72 6f 77 |// Not i|n Metrow|
|00000280| 65 72 6b 73 20 64 65 66 | 61 75 6c 74 20 70 72 65 |erks def|ault pre|
|00000290| 63 6f 6d 70 69 6c 65 64 | 20 68 65 61 64 65 72 73 |compiled| headers|
|000002a0| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 45 64 69 74 69 |.#includ|e <Editi|
|000002b0| 6f 6e 73 2e 68 3e 0d 0d | 23 69 6e 63 6c 75 64 65 |ons.h>..|#include|
|000002c0| 20 22 46 6c 6f 61 74 65 | 72 53 61 6d 70 6c 65 2e | "Floate|rSample.|
|000002d0| 68 22 0d 23 69 6e 63 6c | 75 64 65 20 22 61 70 70 |h".#incl|ude "app|
|000002e0| 6c 65 45 76 65 6e 74 48 | 61 6e 64 6c 65 72 73 2e |leEventH|andlers.|
|000002f0| 68 22 0d 23 69 6e 63 6c | 75 64 65 20 22 65 76 65 |h".#incl|ude "eve|
|00000300| 6e 74 48 61 6e 64 6c 65 | 72 2e 68 22 0d 23 69 6e |ntHandle|r.h".#in|
|00000310| 63 6c 75 64 65 20 22 6d | 65 6e 75 44 69 73 70 61 |clude "m|enuDispa|
|00000320| 74 63 68 2e 68 22 0d 0d | 2f 2a 09 52 6f 75 74 69 |tch.h"..|/*.Routi|
|00000330| 6e 65 20 70 72 6f 74 6f | 74 79 70 65 73 09 2a 2f |ne proto|types.*/|
|00000340| 0d 0d 76 6f 69 64 09 44 | 6f 4d 6f 75 73 65 45 76 |..void.D|oMouseEv|
|00000350| 65 6e 74 20 28 45 76 65 | 6e 74 52 65 63 6f 72 64 |ent (Eve|ntRecord|
|00000360| 20 2a 65 76 65 6e 74 29 | 3b 0d 76 6f 69 64 09 44 | *event)|;.void.D|
|00000370| 6f 4b 65 79 45 76 65 6e | 74 20 28 45 76 65 6e 74 |oKeyEven|t (Event|
|00000380| 52 65 63 6f 72 64 20 2a | 65 76 65 6e 74 29 3b 0d |Record *|event);.|
|00000390| 76 6f 69 64 09 44 6f 41 | 63 74 69 76 61 74 65 45 |void.DoA|ctivateE|
|000003a0| 76 65 6e 74 28 45 76 65 | 6e 74 52 65 63 6f 72 64 |vent(Eve|ntRecord|
|000003b0| 20 2a 65 76 65 6e 74 29 | 3b 0d 76 6f 69 64 09 44 | *event)|;.void.D|
|000003c0| 6f 55 70 64 61 74 65 45 | 76 65 6e 74 20 28 45 76 |oUpdateE|vent (Ev|
|000003d0| 65 6e 74 52 65 63 6f 72 | 64 20 2a 65 76 65 6e 74 |entRecor|d *event|
|000003e0| 29 3b 0d 76 6f 69 64 09 | 44 72 61 77 57 69 6e 64 |);.void.|DrawWind|
|000003f0| 6f 77 43 6f 6e 74 65 6e | 74 28 42 6f 6f 6c 65 61 |owConten|t(Boolea|
|00000400| 6e 20 64 6f 46 69 6c 6c | 29 3b 0d 76 6f 69 64 09 |n doFill|);.void.|
|00000410| 44 6f 4f 53 45 76 65 6e | 74 28 45 76 65 6e 74 52 |DoOSEven|t(EventR|
|00000420| 65 63 6f 72 64 20 2a 65 | 76 65 6e 74 29 3b 0d 76 |ecord *e|vent);.v|
|00000430| 6f 69 64 09 44 6f 48 69 | 67 68 4c 65 76 65 6c 45 |oid.DoHi|ghLevelE|
|00000440| 76 65 6e 74 28 45 76 65 | 6e 74 52 65 63 6f 72 64 |vent(Eve|ntRecord|
|00000450| 20 2a 65 76 65 6e 74 29 | 3b 0d 76 6f 69 64 09 48 | *event)|;.void.H|
|00000460| 61 6e 64 6c 65 47 65 6e | 65 72 69 63 48 69 67 68 |andleGen|ericHigh|
|00000470| 4c 65 76 65 6c 45 76 65 | 6e 74 28 45 76 65 6e 74 |LevelEve|nt(Event|
|00000480| 52 65 63 6f 72 64 20 2a | 65 76 65 6e 74 29 3b 0d |Record *|event);.|
|00000490| 0d 2f 2a 20 47 6c 6f 62 | 61 6c 73 20 2a 2f 0d 09 |./* Glob|als */..|
|000004a0| 0d 65 78 74 65 72 6e 20 | 42 6f 6f 6c 65 61 6e 09 |.extern |Boolean.|
|000004b0| 67 44 6f 6e 65 3b 09 09 | 09 09 09 09 09 2f 2a 20 |gDone;..|...../* |
|000004c0| 53 65 74 20 74 6f 20 74 | 72 75 65 20 69 66 20 75 |Set to t|rue if u|
|000004d0| 73 65 72 20 73 65 6c 65 | 63 74 73 20 51 75 69 74 |ser sele|cts Quit|
|000004e0| 20 2a 2f 0d 65 78 74 65 | 72 6e 20 42 6f 6f 6c 65 | */.exte|rn Boole|
|000004f0| 61 6e 09 67 49 6e 42 61 | 63 6b 67 72 6f 75 6e 64 |an.gInBa|ckground|
|00000500| 3b 09 09 09 09 09 2f 2a | 20 53 65 74 20 74 6f 20 |;...../*| Set to |
|00000510| 74 72 75 65 20 69 66 20 | 61 70 70 20 69 73 20 73 |true if |app is s|
|00000520| 77 69 74 63 68 65 64 20 | 69 6e 74 6f 20 62 61 63 |witched |into bac|
|00000530| 6b 67 72 6f 75 6e 64 20 | 2a 2f 0d 65 78 74 65 72 |kground |*/.exter|
|00000540| 6e 20 73 68 6f 72 74 09 | 67 54 69 6d 65 54 6f 44 |n short.|gTimeToD|
|00000550| 69 61 6c 6f 67 44 69 73 | 6d 69 73 73 61 6c 3b 0d |ialogDis|missal;.|
|00000560| 65 78 74 65 72 6e 20 52 | 65 63 74 09 09 67 44 72 |extern R|ect..gDr|
|00000570| 61 67 41 72 65 61 3b 09 | 09 09 09 09 09 2f 2a 20 |agArea;.|...../* |
|00000580| 41 72 65 61 20 69 6e 20 | 77 68 69 63 68 20 61 20 |Area in |which a |
|00000590| 77 69 6e 64 6f 77 20 63 | 61 6e 20 62 65 20 64 72 |window c|an be dr|
|000005a0| 61 67 67 65 64 20 2a 2f | 0d 65 78 74 65 72 6e 20 |agged */|.extern |
|000005b0| 52 65 63 74 09 09 67 47 | 72 6f 77 42 6f 75 6e 64 |Rect..gG|rowBound|
|000005c0| 73 3b 09 09 09 09 09 2f | 2a 20 4d 69 6e 20 61 6e |s;...../|* Min an|
|000005d0| 64 20 6d 61 78 69 6d 75 | 6d 20 73 69 7a 65 20 61 |d maximu|m size a|
|000005e0| 20 77 69 6e 64 6f 77 20 | 63 61 6e 20 62 65 20 73 | window |can be s|
|000005f0| 69 7a 65 64 20 74 6f 20 | 2a 2f 0d 65 78 74 65 72 |ized to |*/.exter|
|00000600| 6e 20 42 6f 6f 6c 65 61 | 6e 09 67 4e 6f 74 69 66 |n Boolea|n.gNotif|
|00000610| 69 63 61 74 69 6f 6e 50 | 6f 73 74 65 64 3b 09 09 |icationP|osted;..|
|00000620| 09 2f 2f 20 54 72 75 65 | 20 69 66 20 61 20 6e 6f |.// True| if a no|
|00000630| 74 69 66 69 63 61 74 69 | 6f 6e 20 77 61 73 20 70 |tificati|on was p|
|00000640| 6f 73 74 65 64 0d 65 78 | 74 65 72 6e 20 4e 4d 52 |osted.ex|tern NMR|
|00000650| 65 63 09 67 4e 6f 74 69 | 66 69 63 61 74 69 6f 6e |ec.gNoti|fication|
|00000660| 52 65 63 3b 09 09 09 09 | 2f 2f 20 74 68 65 20 6e |Rec;....|// the n|
|00000670| 6f 74 69 66 69 63 61 74 | 69 6f 6e 20 72 65 63 6f |otificat|ion reco|
|00000680| 72 64 0d 65 78 74 65 72 | 6e 20 41 63 74 69 76 61 |rd.exter|n Activa|
|00000690| 74 65 48 61 6e 64 6c 65 | 72 55 50 50 09 67 41 63 |teHandle|rUPP.gAc|
|000006a0| 74 69 76 61 74 65 45 76 | 65 6e 74 48 61 6e 64 6c |tivateEv|entHandl|
|000006b0| 65 72 3b 0d 0d 2f 2a 0d | 09 46 61 74 61 6c 20 65 |er;../*.|.Fatal e|
|000006c0| 72 72 6f 72 20 61 6c 65 | 72 74 20 72 6f 75 74 69 |rror ale|rt routi|
|000006d0| 6e 65 2e 0d 09 49 66 20 | 61 6e 20 65 72 72 6f 72 |ne...If |an error|
|000006e0| 20 6f 63 63 75 72 73 2c | 20 74 68 69 73 20 72 6f | occurs,| this ro|
|000006f0| 75 74 69 6e 65 20 69 73 | 20 63 61 6c 6c 65 64 20 |utine is| called |
|00000700| 77 69 74 68 20 74 68 65 | 20 65 72 72 6f 72 20 6d |with the| error m|
|00000710| 65 73 73 61 67 65 20 6e | 75 6d 62 65 72 0d 09 74 |essage n|umber..t|
|00000720| 68 61 74 20 6d 65 73 73 | 61 67 65 20 69 73 20 70 |hat mess|age is p|
|00000730| 75 6c 6c 65 64 20 66 72 | 6f 6d 20 74 68 65 20 65 |ulled fr|om the e|
|00000740| 72 72 6f 72 20 53 54 52 | 23 20 72 65 73 6f 75 72 |rror STR|# resour|
|00000750| 63 65 2c 20 61 6e 64 20 | 64 69 73 70 6c 61 79 65 |ce, and |displaye|
|00000760| 64 20 69 6e 20 61 6e 0d | 09 61 6c 65 72 74 2e 20 |d in an.|.alert. |
|00000770| 20 54 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | The app|lication|
|00000780| 20 74 68 65 6e 20 71 75 | 69 74 73 20 77 68 65 6e | then qu|its when|
|00000790| 20 74 68 65 20 75 73 65 | 72 20 63 6c 69 63 6b 73 | the use|r clicks|
|000007a0| 20 74 68 65 20 d2 4f 4b | d3 20 62 75 74 74 6f 6e | the .OK|. button|
|000007b0| 2e 0d 2a 2f 0d 76 6f 69 | 64 09 09 46 61 74 61 6c |..*/.voi|d..Fatal|
|000007c0| 45 72 72 6f 72 41 6c 65 | 72 74 28 73 68 6f 72 74 |ErrorAle|rt(short|
|000007d0| 09 65 72 72 49 44 29 0d | 7b 0d 09 73 68 6f 72 74 |.errID).|{..short|
|000007e0| 09 61 6c 72 74 49 74 65 | 6d 3b 0d 09 53 74 72 32 |.alrtIte|m;..Str2|
|000007f0| 35 35 09 65 72 72 53 74 | 72 69 6e 67 3b 0d 09 0d |55.errSt|ring;...|
|00000800| 09 47 65 74 49 6e 64 53 | 74 72 69 6e 67 28 65 72 |.GetIndS|tring(er|
|00000810| 72 53 74 72 69 6e 67 2c | 20 72 46 61 74 61 6c 45 |rString,| rFatalE|
|00000820| 72 72 6f 72 53 74 72 69 | 6e 67 73 49 44 2c 20 65 |rrorStri|ngsID, e|
|00000830| 72 72 49 44 29 3b 0d 09 | 50 61 72 61 6d 54 65 78 |rrID);..|ParamTex|
|00000840| 74 28 65 72 72 53 74 72 | 69 6e 67 2c 20 6e 69 6c |t(errStr|ing, nil|
|00000850| 2c 20 6e 69 6c 2c 20 6e | 69 6c 29 3b 0d 09 61 6c |, nil, n|il);..al|
|00000860| 72 74 49 74 65 6d 20 3d | 20 41 6c 65 72 74 28 72 |rtItem =| Alert(r|
|00000870| 46 61 74 61 6c 45 72 72 | 6f 72 41 6c 65 72 74 49 |FatalErr|orAlertI|
|00000880| 44 2c 20 6e 69 6c 29 3b | 0d 09 45 78 69 74 54 6f |D, nil);|..ExitTo|
|00000890| 53 68 65 6c 6c 28 29 3b | 0d 7d 0d 0d 76 6f 69 64 |Shell();|.}..void|
|000008a0| 09 45 76 65 6e 74 4c 6f | 6f 70 28 29 0d 7b 0d 09 |.EventLo|op().{..|
|000008b0| 45 76 65 6e 74 52 65 63 | 6f 72 64 09 65 76 65 6e |EventRec|ord.even|
|000008c0| 74 3b 0d 09 44 69 61 6c | 6f 67 50 74 72 09 74 68 |t;..Dial|ogPtr.th|
|000008d0| 65 44 69 61 6c 6f 67 3b | 0d 09 73 68 6f 72 74 09 |eDialog;|..short.|
|000008e0| 09 69 74 65 6d 48 69 74 | 3b 0d 09 42 6f 6f 6c 65 |.itemHit|;..Boole|
|000008f0| 61 6e 09 09 67 6f 74 45 | 76 65 6e 74 3b 0d 09 50 |an..gotE|vent;..P|
|00000900| 72 6f 63 65 73 73 53 65 | 72 69 61 6c 4e 75 6d 62 |rocessSe|rialNumb|
|00000910| 65 72 09 63 75 72 72 65 | 6e 74 50 53 4e 2c 20 66 |er.curre|ntPSN, f|
|00000920| 72 6f 6e 74 50 53 4e 3b | 0d 09 4f 53 45 72 72 09 |rontPSN;|..OSErr.|
|00000930| 09 67 65 74 46 72 6f 6e | 74 50 72 6f 63 65 73 73 |.getFron|tProcess|
|00000940| 52 65 73 75 6c 74 2c 20 | 67 65 74 43 75 72 72 65 |Result, |getCurre|
|00000950| 6e 74 50 72 6f 63 65 73 | 73 52 65 73 75 6c 74 3b |ntProces|sResult;|
|00000960| 0d 09 42 6f 6f 6c 65 61 | 6e 09 09 69 73 46 72 6f |..Boolea|n..isFro|
|00000970| 6e 74 50 72 6f 63 65 73 | 73 20 3d 20 66 61 6c 73 |ntProces|s = fals|
|00000980| 65 3b 0d 09 0d 09 2f 2f | 20 53 65 74 20 67 49 6e |e;....//| Set gIn|
|00000990| 42 61 63 6b 67 72 6f 75 | 6e 64 20 61 70 70 72 6f |Backgrou|nd appro|
|000009a0| 70 72 69 61 74 65 6c 79 | 0d 09 2f 2f 20 43 6f 6d |priately|..// Com|
|000009b0| 70 61 72 65 20 74 68 69 | 73 20 70 72 6f 63 65 73 |pare thi|s proces|
|000009c0| 73 20 61 6e 64 20 74 68 | 65 20 66 72 6f 6e 74 20 |s and th|e front |
|000009d0| 70 72 6f 63 65 73 73 0d | 09 67 65 74 46 72 6f 6e |process.|.getFron|
|000009e0| 74 50 72 6f 63 65 73 73 | 52 65 73 75 6c 74 20 3d |tProcess|Result =|
|000009f0| 20 47 65 74 46 72 6f 6e | 74 50 72 6f 63 65 73 73 | GetFron|tProcess|
|00000a00| 28 26 66 72 6f 6e 74 50 | 53 4e 29 3b 0d 09 67 65 |(&frontP|SN);..ge|
|00000a10| 74 43 75 72 72 65 6e 74 | 50 72 6f 63 65 73 73 52 |tCurrent|ProcessR|
|00000a20| 65 73 75 6c 74 20 3d 20 | 47 65 74 43 75 72 72 65 |esult = |GetCurre|
|00000a30| 6e 74 50 72 6f 63 65 73 | 73 28 26 63 75 72 72 65 |ntProces|s(&curre|
|00000a40| 6e 74 50 53 4e 29 3b 0d | 09 69 66 20 28 28 67 65 |ntPSN);.|.if ((ge|
|00000a50| 74 46 72 6f 6e 74 50 72 | 6f 63 65 73 73 52 65 73 |tFrontPr|ocessRes|
|00000a60| 75 6c 74 20 3d 3d 20 6e | 6f 45 72 72 29 20 26 26 |ult == n|oErr) &&|
|00000a70| 20 28 67 65 74 43 75 72 | 72 65 6e 74 50 72 6f 63 | (getCur|rentProc|
|00000a80| 65 73 73 52 65 73 75 6c | 74 20 3d 3d 20 6e 6f 45 |essResul|t == noE|
|00000a90| 72 72 29 29 0d 09 09 53 | 61 6d 65 50 72 6f 63 65 |rr))...S|ameProce|
|00000aa0| 73 73 28 26 66 72 6f 6e | 74 50 53 4e 2c 20 26 63 |ss(&fron|tPSN, &c|
|00000ab0| 75 72 72 65 6e 74 50 53 | 4e 2c 20 26 69 73 46 72 |urrentPS|N, &isFr|
|00000ac0| 6f 6e 74 50 72 6f 63 65 | 73 73 29 3b 0d 09 67 49 |ontProce|ss);..gI|
|00000ad0| 6e 42 61 63 6b 67 72 6f | 75 6e 64 20 3d 20 21 69 |nBackgro|und = !i|
|00000ae0| 73 46 72 6f 6e 74 50 72 | 6f 63 65 73 73 3b 0d 09 |sFrontPr|ocess;..|
|00000af0| 0d 09 67 44 6f 6e 65 20 | 3d 20 66 61 6c 73 65 3b |..gDone |= false;|
|00000b00| 0d 09 0d 09 64 6f 20 7b | 0d 09 09 67 6f 74 45 76 |....do {|...gotEv|
|00000b10| 65 6e 74 20 3d 20 57 61 | 69 74 4e 65 78 74 45 76 |ent = Wa|itNextEv|
|00000b20| 65 6e 74 28 65 76 65 72 | 79 45 76 65 6e 74 2c 20 |ent(ever|yEvent, |
|00000b30| 26 65 76 65 6e 74 2c 20 | 31 35 2c 20 6e 69 6c 29 |&event, |15, nil)|
|00000b40| 3b 0d 09 09 69 66 20 28 | 67 6f 74 45 76 65 6e 74 |;...if (|gotEvent|
|00000b50| 29 20 7b 0d 09 09 09 69 | 66 20 28 21 49 73 44 69 |) {....i|f (!IsDi|
|00000b60| 61 6c 6f 67 45 76 65 6e | 74 28 26 65 76 65 6e 74 |alogEven|t(&event|
|00000b70| 29 29 0d 09 09 09 09 48 | 61 6e 64 6c 65 45 76 65 |)).....H|andleEve|
|00000b80| 6e 74 28 26 65 76 65 6e | 74 29 3b 0d 09 09 09 65 |nt(&even|t);....e|
|00000b90| 6c 73 65 20 7b 0d 09 09 | 09 09 44 69 61 6c 6f 67 |lse {...|..Dialog|
|00000ba0| 53 65 6c 65 63 74 28 26 | 65 76 65 6e 74 2c 20 26 |Select(&|event, &|
|00000bb0| 74 68 65 44 69 61 6c 6f | 67 2c 20 26 69 74 65 6d |theDialo|g, &item|
|00000bc0| 48 69 74 29 3b 0d 09 09 | 09 09 69 66 20 28 28 69 |Hit);...|..if ((i|
|00000bd0| 74 65 6d 48 69 74 20 3d | 3d 20 6f 6b 29 20 7c 7c |temHit =|= ok) |||
|00000be0| 20 28 69 74 65 6d 48 69 | 74 20 3d 3d 20 63 61 6e | (itemHi|t == can|
|00000bf0| 63 65 6c 29 29 0d 09 09 | 09 09 09 44 69 73 70 6f |cel))...|...Dispo|
|00000c00| 73 65 46 69 6e 64 44 69 | 61 6c 6f 67 28 29 3b 0d |seFindDi|alog();.|
|00000c10| 09 09 09 09 0d 09 09 09 | 09 69 66 20 28 65 76 65 |........|.if (eve|
|00000c20| 6e 74 2e 77 68 61 74 20 | 3d 3d 20 6f 73 45 76 74 |nt.what |== osEvt|
|00000c30| 29 0d 09 09 09 09 09 44 | 6f 4f 53 45 76 65 6e 74 |)......D|oOSEvent|
|00000c40| 28 26 65 76 65 6e 74 29 | 3b 0d 09 09 09 7d 0d 09 |(&event)|;....}..|
|00000c50| 09 7d 0d 09 09 0d 09 09 | 2f 2f 20 49 66 20 77 65 |.}......|// If we|
|00000c60| d5 72 65 20 69 6e 20 74 | 68 65 20 62 61 63 6b 67 |.re in t|he backg|
|00000c70| 72 6f 75 6e 64 2c 20 61 | 6e 64 20 74 68 65 20 66 |round, a|nd the f|
|00000c80| 69 6e 64 20 64 69 61 6c | 6f 67 20 69 73 20 75 70 |ind dial|og is up|
|00000c90| 2c 20 63 6c 6f 73 65 20 | 69 74 20 61 66 74 65 72 |, close |it after|
|00000ca0| 0d 09 09 2f 2f 20 61 20 | 74 69 6d 65 20 74 6f 20 |...// a |time to |
|00000cb0| 64 65 6d 6f 6e 73 74 72 | 61 74 65 20 77 68 61 74 |demonstr|ate what|
|00000cc0| 20 73 68 6f 75 6c 64 20 | 68 61 70 70 65 6e 20 74 | should |happen t|
|00000cd0| 6f 20 66 6c 6f 61 74 69 | 6e 67 20 77 69 6e 64 6f |o floati|ng windo|
|00000ce0| 77 73 20 69 6e 20 74 68 | 65 20 62 61 63 6b 67 72 |ws in th|e backgr|
|00000cf0| 6f 75 6e 64 2e 0d 09 09 | 0d 09 09 69 66 20 28 67 |ound....|...if (g|
|00000d00| 49 6e 42 61 63 6b 67 72 | 6f 75 6e 64 20 26 26 20 |InBackgr|ound && |
|00000d10| 28 67 54 69 6d 65 54 6f | 44 69 61 6c 6f 67 44 69 |(gTimeTo|DialogDi|
|00000d20| 73 6d 69 73 73 61 6c 20 | 3e 20 30 29 29 20 7b 0d |smissal |> 0)) {.|
|00000d30| 09 09 09 2d 2d 67 54 69 | 6d 65 54 6f 44 69 61 6c |...--gTi|meToDial|
|00000d40| 6f 67 44 69 73 6d 69 73 | 73 61 6c 3b 0d 09 09 09 |ogDismis|sal;....|
|00000d50| 69 66 20 28 67 54 69 6d | 65 54 6f 44 69 61 6c 6f |if (gTim|eToDialo|
|00000d60| 67 44 69 73 6d 69 73 73 | 61 6c 20 3d 3d 20 30 29 |gDismiss|al == 0)|
|00000d70| 0d 09 09 09 09 44 69 73 | 70 6f 73 65 46 69 6e 64 |.....Dis|poseFind|
|00000d80| 44 69 61 6c 6f 67 28 29 | 3b 0d 09 09 7d 0d 09 7d |Dialog()|;...}..}|
|00000d90| 20 77 68 69 6c 65 20 28 | 21 67 44 6f 6e 65 29 3b | while (|!gDone);|
|00000da0| 0d 09 45 78 69 74 54 6f | 53 68 65 6c 6c 28 29 3b |..ExitTo|Shell();|
|00000db0| 0d 7d 0d 0d 76 6f 69 64 | 09 48 61 6e 64 6c 65 45 |.}..void|.HandleE|
|00000dc0| 76 65 6e 74 28 45 76 65 | 6e 74 52 65 63 6f 72 64 |vent(Eve|ntRecord|
|00000dd0| 09 2a 65 76 65 6e 74 29 | 0d 7b 0d 09 73 77 69 74 |.*event)|.{..swit|
|00000de0| 63 68 20 28 65 76 65 6e | 74 2d 3e 77 68 61 74 29 |ch (even|t->what)|
|00000df0| 20 7b 0d 09 09 63 61 73 | 65 20 6d 6f 75 73 65 44 | {...cas|e mouseD|
|00000e00| 6f 77 6e 3a 09 09 09 44 | 6f 4d 6f 75 73 65 45 76 |own:...D|oMouseEv|
|00000e10| 65 6e 74 28 65 76 65 6e | 74 29 3b 0d 09 09 09 09 |ent(even|t);.....|
|00000e20| 09 09 09 09 62 72 65 61 | 6b 3b 0d 09 09 63 61 73 |....brea|k;...cas|
|00000e30| 65 20 6b 65 79 44 6f 77 | 6e 3a 0d 09 09 63 61 73 |e keyDow|n:...cas|
|00000e40| 65 20 61 75 74 6f 4b 65 | 79 3a 09 09 09 44 6f 4b |e autoKe|y:...DoK|
|00000e50| 65 79 45 76 65 6e 74 28 | 65 76 65 6e 74 29 3b 0d |eyEvent(|event);.|
|00000e60| 09 09 09 09 09 09 09 09 | 62 72 65 61 6b 3b 0d 09 |........|break;..|
|00000e70| 09 63 61 73 65 20 61 63 | 74 69 76 61 74 65 45 76 |.case ac|tivateEv|
|00000e80| 74 3a 09 09 44 6f 41 63 | 74 69 76 61 74 65 45 76 |t:..DoAc|tivateEv|
|00000e90| 65 6e 74 28 65 76 65 6e | 74 29 3b 0d 09 09 09 09 |ent(even|t);.....|
|00000ea0| 09 09 09 09 62 72 65 61 | 6b 3b 0d 09 09 63 61 73 |....brea|k;...cas|
|00000eb0| 65 20 75 70 64 61 74 65 | 45 76 74 3a 09 09 09 44 |e update|Evt:...D|
|00000ec0| 6f 55 70 64 61 74 65 45 | 76 65 6e 74 28 65 76 65 |oUpdateE|vent(eve|
|00000ed0| 6e 74 29 3b 0d 09 09 09 | 09 09 09 09 09 62 72 65 |nt);....|.....bre|
|00000ee0| 61 6b 3b 0d 09 09 63 61 | 73 65 20 6f 73 45 76 74 |ak;...ca|se osEvt|
|00000ef0| 3a 09 09 09 09 44 6f 4f | 53 45 76 65 6e 74 28 65 |:....DoO|SEvent(e|
|00000f00| 76 65 6e 74 29 3b 0d 09 | 09 09 09 09 09 09 09 62 |vent);..|.......b|
|00000f10| 72 65 61 6b 3b 0d 09 09 | 63 61 73 65 20 6b 48 69 |reak;...|case kHi|
|00000f20| 67 68 4c 65 76 65 6c 45 | 76 65 6e 74 3a 09 44 6f |ghLevelE|vent:.Do|
|00000f30| 48 69 67 68 4c 65 76 65 | 6c 45 76 65 6e 74 28 65 |HighLeve|lEvent(e|
|00000f40| 76 65 6e 74 29 3b 0d 09 | 09 09 09 09 09 09 09 62 |vent);..|.......b|
|00000f50| 72 65 61 6b 3b 0d 09 09 | 09 09 09 09 09 09 09 09 |reak;...|........|
|00000f60| 09 09 09 09 0d 09 7d 0d | 7d 0d 0d 76 6f 69 64 09 |......}.|}..void.|
|00000f70| 44 6f 4d 6f 75 73 65 45 | 76 65 6e 74 28 45 76 65 |DoMouseE|vent(Eve|
|00000f80| 6e 74 52 65 63 6f 72 64 | 20 2a 65 76 65 6e 74 29 |ntRecord| *event)|
|00000f90| 0d 7b 0d 09 73 68 6f 72 | 74 09 09 70 61 72 74 3b |.{..shor|t..part;|
|00000fa0| 0d 09 6c 6f 6e 67 09 09 | 67 72 6f 77 52 65 73 75 |..long..|growResu|
|00000fb0| 6c 74 3b 0d 09 57 69 6e | 64 6f 77 52 65 66 09 77 |lt;..Win|dowRef.w|
|00000fc0| 68 69 63 68 57 69 6e 64 | 6f 77 3b 0d 09 57 69 6e |hichWind|ow;..Win|
|00000fd0| 64 6f 77 52 65 66 09 66 | 72 6f 6e 74 57 69 6e 64 |dowRef.f|rontWind|
|00000fe0| 6f 77 3b 0d 09 0d 09 70 | 61 72 74 20 3d 20 46 69 |ow;....p|art = Fi|
|00000ff0| 6e 64 57 69 6e 64 6f 77 | 28 65 76 65 6e 74 2d 3e |ndWindow|(event->|
|00001000| 77 68 65 72 65 2c 20 26 | 77 68 69 63 68 57 69 6e |where, &|whichWin|
|00001010| 64 6f 77 29 3b 0d 09 73 | 77 69 74 63 68 20 28 70 |dow);..s|witch (p|
|00001020| 61 72 74 29 20 7b 0d 09 | 09 63 61 73 65 20 69 6e |art) {..|.case in|
|00001030| 44 65 73 6b 3a 09 09 62 | 72 65 61 6b 3b 0d 09 09 |Desk:..b|reak;...|
|00001040| 63 61 73 65 20 69 6e 4d | 65 6e 75 42 61 72 3a 20 |case inM|enuBar: |
|00001050| 09 44 6f 4d 65 6e 75 43 | 6f 6d 6d 61 6e 64 28 4d |.DoMenuC|ommand(M|
|00001060| 65 6e 75 53 65 6c 65 63 | 74 28 65 76 65 6e 74 2d |enuSelec|t(event-|
|00001070| 3e 77 68 65 72 65 29 29 | 3b 0d 09 09 09 09 09 09 |>where))|;.......|
|00001080| 09 62 72 65 61 6b 3b 0d | 09 09 63 61 73 65 20 69 |.break;.|..case i|
|00001090| 6e 53 79 73 57 69 6e 64 | 6f 77 3a 09 53 79 73 74 |nSysWind|ow:.Syst|
|000010a0| 65 6d 43 6c 69 63 6b 28 | 65 76 65 6e 74 2c 20 28 |emClick(|event, (|
|000010b0| 57 69 6e 64 6f 77 50 74 | 72 29 77 68 69 63 68 57 |WindowPt|r)whichW|
|000010c0| 69 6e 64 6f 77 29 3b 0d | 09 09 09 09 09 09 09 62 |indow);.|.......b|
|000010d0| 72 65 61 6b 3b 0d 09 09 | 63 61 73 65 20 69 6e 43 |reak;...|case inC|
|000010e0| 6f 6e 74 65 6e 74 3a 09 | 09 66 72 6f 6e 74 57 69 |ontent:.|.frontWi|
|000010f0| 6e 64 6f 77 20 3d 20 46 | 72 6f 6e 74 57 69 6e 64 |ndow = F|rontWind|
|00001100| 6f 77 28 29 3b 0d 09 09 | 09 09 09 09 09 69 66 20 |ow();...|.....if |
|00001110| 28 57 69 6e 64 6f 77 49 | 73 4d 6f 64 61 6c 28 66 |(WindowI|sModal(f|
|00001120| 72 6f 6e 74 57 69 6e 64 | 6f 77 29 20 26 26 0d 09 |rontWind|ow) &&..|
|00001130| 09 09 09 09 09 09 09 28 | 77 68 69 63 68 57 69 6e |.......(|whichWin|
|00001140| 64 6f 77 20 21 3d 20 66 | 72 6f 6e 74 57 69 6e 64 |dow != f|rontWind|
|00001150| 6f 77 29 29 0d 09 09 09 | 09 09 09 09 09 09 53 79 |ow))....|......Sy|
|00001160| 73 42 65 65 70 28 31 29 | 3b 0d 09 09 09 09 09 09 |sBeep(1)|;.......|
|00001170| 09 65 6c 73 65 20 69 66 | 20 28 77 68 69 63 68 57 |.else if| (whichW|
|00001180| 69 6e 64 6f 77 20 21 3d | 20 66 72 6f 6e 74 57 69 |indow !=| frontWi|
|00001190| 6e 64 6f 77 29 0d 09 09 | 09 09 09 09 09 09 09 53 |ndow)...|.......S|
|000011a0| 65 6c 65 63 74 52 65 66 | 65 72 65 6e 63 65 64 57 |electRef|erencedW|
|000011b0| 69 6e 64 6f 77 28 77 68 | 69 63 68 57 69 6e 64 6f |indow(wh|ichWindo|
|000011c0| 77 29 3b 0d 09 09 09 09 | 09 09 09 65 6c 73 65 20 |w);.....|...else |
|000011d0| 2f 2f 20 74 65 73 74 69 | 6e 67 2c 20 74 65 73 74 |// testi|ng, test|
|000011e0| 69 6e 67 0d 09 09 09 09 | 09 09 09 7b 0d 09 09 09 |ing.....|...{....|
|000011f0| 09 09 09 09 09 50 6f 69 | 6e 74 09 09 09 6c 6f 63 |.....Poi|nt...loc|
|00001200| 61 6c 50 74 3b 0d 09 09 | 09 09 09 09 09 09 43 6f |alPt;...|......Co|
|00001210| 6e 74 72 6f 6c 48 61 6e | 64 6c 65 09 63 48 61 6e |ntrolHan|dle.cHan|
|00001220| 64 6c 65 3b 0d 09 09 09 | 09 09 09 09 09 73 68 6f |dle;....|.....sho|
|00001230| 72 74 09 09 09 69 6e 57 | 68 61 74 3b 0d 09 09 09 |rt...inW|hat;....|
|00001240| 09 09 09 09 09 0d 09 09 | 09 09 09 09 09 09 2f 2f |........|......//|
|00001250| 20 6d 69 67 68 74 20 62 | 65 20 6f 75 72 20 74 65 | might b|e our te|
|00001260| 73 74 20 6d 6f 64 61 6c | 0d 09 09 09 09 09 09 09 |st modal|........|
|00001270| 09 53 65 74 50 6f 72 74 | 28 28 47 72 61 66 50 74 |.SetPort|((GrafPt|
|00001280| 72 29 47 65 74 57 69 6e | 64 6f 77 50 6f 72 74 28 |r)GetWin|dowPort(|
|00001290| 77 68 69 63 68 57 69 6e | 64 6f 77 29 29 3b 0d 09 |whichWin|dow));..|
|000012a0| 09 09 09 09 09 09 09 6c | 6f 63 61 6c 50 74 20 3d |.......l|ocalPt =|
|000012b0| 20 65 76 65 6e 74 2d 3e | 77 68 65 72 65 3b 0d 09 | event->|where;..|
|000012c0| 09 09 09 09 09 09 09 47 | 6c 6f 62 61 6c 54 6f 4c |.......G|lobalToL|
|000012d0| 6f 63 61 6c 28 26 6c 6f | 63 61 6c 50 74 29 3b 0d |ocal(&lo|calPt);.|
|000012e0| 09 09 09 09 09 09 09 09 | 69 6e 57 68 61 74 20 3d |........|inWhat =|
|000012f0| 20 46 69 6e 64 43 6f 6e | 74 72 6f 6c 28 6c 6f 63 | FindCon|trol(loc|
|00001300| 61 6c 50 74 2c 20 77 68 | 69 63 68 57 69 6e 64 6f |alPt, wh|ichWindo|
|00001310| 77 2c 20 26 63 48 61 6e | 64 6c 65 29 3b 0d 09 09 |w, &cHan|dle);...|
|00001320| 09 09 09 09 09 09 69 66 | 28 69 6e 57 68 61 74 20 |......if|(inWhat |
|00001330| 3d 3d 20 69 6e 42 75 74 | 74 6f 6e 20 26 26 20 47 |== inBut|ton && G|
|00001340| 65 74 43 6f 6e 74 72 6f | 6c 52 65 66 65 72 65 6e |etContro|lReferen|
|00001350| 63 65 28 63 48 61 6e 64 | 6c 65 29 20 3d 3d 20 27 |ce(cHand|le) == '|
|00001360| 44 41 56 45 27 29 0d 09 | 09 09 09 09 09 09 09 7b |DAVE')..|.......{|
|00001370| 0d 09 09 09 09 09 09 09 | 09 09 69 66 28 54 72 61 |........|..if(Tra|
|00001380| 63 6b 43 6f 6e 74 72 6f | 6c 28 63 48 61 6e 64 6c |ckContro|l(cHandl|
|00001390| 65 2c 20 6c 6f 63 61 6c | 50 74 2c 20 6e 69 6c 29 |e, local|Pt, nil)|
|000013a0| 29 0d 09 09 09 09 09 09 | 09 09 09 7b 0d 09 09 09 |).......|...{....|
|000013b0| 09 09 09 09 09 09 09 44 | 69 73 70 6f 73 65 57 69 |.......D|isposeWi|
|000013c0| 6e 64 6f 77 52 65 66 65 | 72 65 6e 63 65 28 77 68 |ndowRefe|rence(wh|
|000013d0| 69 63 68 57 69 6e 64 6f | 77 29 3b 0d 09 09 09 09 |ichWindo|w);.....|
|000013e0| 09 09 09 09 09 09 41 63 | 74 69 76 61 74 65 46 6c |......Ac|tivateFl|
|000013f0| 6f 61 74 65 72 73 41 6e | 64 46 69 72 73 74 44 6f |oatersAn|dFirstDo|
|00001400| 63 75 6d 65 6e 74 57 69 | 6e 64 6f 77 28 29 3b 0d |cumentWi|ndow();.|
|00001410| 09 09 09 09 09 09 09 09 | 09 7d 0d 09 09 09 09 09 |........|.}......|
|00001420| 09 09 09 7d 0d 09 09 09 | 09 09 09 09 7d 0d 09 09 |...}....|....}...|
|00001430| 09 09 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 63 61 |.....bre|ak;...ca|
|00001440| 73 65 20 69 6e 44 72 61 | 67 3a 09 09 66 72 6f 6e |se inDra|g:..fron|
|00001450| 74 57 69 6e 64 6f 77 20 | 3d 20 46 72 6f 6e 74 57 |tWindow |= FrontW|
|00001460| 69 6e 64 6f 77 28 29 3b | 0d 09 09 09 09 09 09 09 |indow();|........|
|00001470| 69 66 20 28 57 69 6e 64 | 6f 77 49 73 4d 6f 64 61 |if (Wind|owIsModa|
|00001480| 6c 28 66 72 6f 6e 74 57 | 69 6e 64 6f 77 29 20 26 |l(frontW|indow) &|
|00001490| 26 0d 09 09 09 09 09 09 | 09 09 28 77 68 69 63 68 |&.......|..(which|
|000014a0| 57 69 6e 64 6f 77 20 21 | 3d 20 66 72 6f 6e 74 57 |Window !|= frontW|
|000014b0| 69 6e 64 6f 77 29 29 0d | 09 09 09 09 09 09 09 09 |indow)).|........|
|000014c0| 09 53 79 73 42 65 65 70 | 28 31 29 3b 0d 09 09 09 |.SysBeep|(1);....|
|000014d0| 09 09 09 09 65 6c 73 65 | 0d 09 09 09 09 09 09 09 |....else|........|
|000014e0| 09 44 72 61 67 52 65 66 | 65 72 65 6e 63 65 64 57 |.DragRef|erencedW|
|000014f0| 69 6e 64 6f 77 28 77 68 | 69 63 68 57 69 6e 64 6f |indow(wh|ichWindo|
|00001500| 77 2c 20 65 76 65 6e 74 | 2d 3e 77 68 65 72 65 2c |w, event|->where,|
|00001510| 20 26 67 44 72 61 67 41 | 72 65 61 29 3b 0d 09 09 | &gDragA|rea);...|
|00001520| 09 09 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 63 61 |.....bre|ak;...ca|
|00001530| 73 65 20 69 6e 47 72 6f | 77 3a 09 09 67 72 6f 77 |se inGro|w:..grow|
|00001540| 52 65 73 75 6c 74 20 3d | 20 47 72 6f 77 57 69 6e |Result =| GrowWin|
|00001550| 64 6f 77 28 77 68 69 63 | 68 57 69 6e 64 6f 77 2c |dow(whic|hWindow,|
|00001560| 20 65 76 65 6e 74 2d 3e | 77 68 65 72 65 2c 20 26 | event->|where, &|
|00001570| 67 47 72 6f 77 42 6f 75 | 6e 64 73 29 3b 0d 09 09 |gGrowBou|nds);...|
|00001580| 09 09 09 09 09 09 53 69 | 7a 65 57 69 6e 64 6f 77 |......Si|zeWindow|
|00001590| 28 77 68 69 63 68 57 69 | 6e 64 6f 77 2c 20 67 72 |(whichWi|ndow, gr|
|000015a0| 6f 77 52 65 73 75 6c 74 | 20 26 20 30 78 30 30 30 |owResult| & 0x000|
|000015b0| 30 46 46 46 46 2c 20 28 | 67 72 6f 77 52 65 73 75 |0FFFF, (|growResu|
|000015c0| 6c 74 20 26 20 30 78 46 | 46 46 46 30 30 30 30 29 |lt & 0xF|FFF0000)|
|000015d0| 20 3e 3e 20 31 36 2c 20 | 74 72 75 65 29 3b 0d 09 | >> 16, |true);..|
|000015e0| 09 09 09 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 63 |......br|eak;...c|
|000015f0| 61 73 65 20 69 6e 47 6f | 41 77 61 79 3a 09 09 69 |ase inGo|Away:..i|
|00001600| 66 20 28 54 72 61 63 6b | 47 6f 41 77 61 79 28 77 |f (Track|GoAway(w|
|00001610| 68 69 63 68 57 69 6e 64 | 6f 77 2c 20 65 76 65 6e |hichWind|ow, even|
|00001620| 74 2d 3e 77 68 65 72 65 | 29 29 20 7b 0d 09 09 09 |t->where|)) {....|
|00001630| 09 09 09 09 09 0d 09 09 | 09 09 09 09 09 09 2f 2f |........|......//|
|00001640| 20 41 6c 6c 20 74 68 65 | 73 65 20 62 69 7a 61 72 | All the|se bizar|
|00001650| 72 65 20 63 61 73 65 73 | 20 61 72 65 20 66 6f 72 |re cases| are for|
|00001660| 20 74 65 73 74 69 6e 67 | 20 70 75 70 6f 73 65 73 | testing| puposes|
|00001670| 2e 2e 2e 0d 09 09 09 09 | 09 09 09 09 69 66 28 65 |........|....if(e|
|00001680| 76 65 6e 74 2d 3e 6d 6f | 64 69 66 69 65 72 73 20 |vent->mo|difiers |
|00001690| 26 20 6f 70 74 69 6f 6e | 4b 65 79 29 0d 09 09 09 |& option|Key)....|
|000016a0| 09 09 09 09 09 7b 0d 09 | 09 09 09 09 09 09 09 09 |.....{..|........|
|000016b0| 2f 2f 20 48 69 64 65 20 | 74 68 65 6e 20 73 68 6f |// Hide |then sho|
|000016c0| 77 20 74 68 65 20 77 69 | 6e 64 6f 77 0d 09 09 09 |w the wi|ndow....|
|000016d0| 09 09 09 09 09 09 48 69 | 64 65 52 65 66 65 72 65 |......Hi|deRefere|
|000016e0| 6e 63 65 64 57 69 6e 64 | 6f 77 28 77 68 69 63 68 |ncedWind|ow(which|
|000016f0| 57 69 6e 64 6f 77 29 3b | 0d 09 09 09 09 09 09 09 |Window);|........|
|00001700| 09 09 53 68 6f 77 52 65 | 66 65 72 65 6e 63 65 64 |..ShowRe|ferenced|
|00001710| 57 69 6e 64 6f 77 28 77 | 68 69 63 68 57 69 6e 64 |Window(w|hichWind|
|00001720| 6f 77 29 3b 0d 09 09 09 | 09 09 09 09 09 7d 0d 09 |ow);....|.....}..|
|00001730| 09 09 09 09 09 09 09 65 | 6c 73 65 20 69 66 28 65 |.......e|lse if(e|
|00001740| 76 65 6e 74 2d 3e 6d 6f | 64 69 66 69 65 72 73 20 |vent->mo|difiers |
|00001750| 26 20 63 6d 64 4b 65 79 | 29 0d 09 09 09 09 09 09 |& cmdKey|).......|
|00001760| 09 09 7b 0d 09 09 09 09 | 09 09 09 09 09 57 69 6e |..{.....|.....Win|
|00001770| 64 6f 77 52 65 66 09 6e | 65 78 74 20 3d 20 47 65 |dowRef.n|ext = Ge|
|00001780| 74 4e 65 78 74 56 69 73 | 69 62 6c 65 57 69 6e 64 |tNextVis|ibleWind|
|00001790| 6f 77 28 77 68 69 63 68 | 57 69 6e 64 6f 77 29 3b |ow(which|Window);|
|000017a0| 0d 09 09 09 09 09 09 09 | 09 09 0d 09 09 09 09 09 |........|........|
|000017b0| 09 09 09 09 2f 2f 20 48 | 69 64 65 20 74 68 69 73 |....// H|ide this|
|000017c0| 20 77 69 6e 64 6f 77 2c | 20 74 68 65 6e 20 74 68 | window,| then th|
|000017d0| 65 20 6e 65 78 74 0d 09 | 09 09 09 09 09 09 09 09 |e next..|........|
|000017e0| 48 69 64 65 52 65 66 65 | 72 65 6e 63 65 64 57 69 |HideRefe|rencedWi|
|000017f0| 6e 64 6f 77 28 77 68 69 | 63 68 57 69 6e 64 6f 77 |ndow(whi|chWindow|
|00001800| 29 3b 0d 09 09 09 09 09 | 09 09 09 09 48 69 64 65 |);......|....Hide|
|00001810| 52 65 66 65 72 65 6e 63 | 65 64 57 69 6e 64 6f 77 |Referenc|edWindow|
|00001820| 28 6e 65 78 74 29 3b 0d | 09 09 09 09 09 09 09 09 |(next);.|........|
|00001830| 7d 0d 09 09 09 09 09 09 | 09 09 65 6c 73 65 20 69 |}.......|..else i|
|00001840| 66 28 65 76 65 6e 74 2d | 3e 6d 6f 64 69 66 69 65 |f(event-|>modifie|
|00001850| 72 73 20 26 20 73 68 69 | 66 74 4b 65 79 29 0d 09 |rs & shi|ftKey)..|
|00001860| 09 09 09 09 09 09 09 7b | 0d 09 09 09 09 09 09 09 |.......{|........|
|00001870| 09 09 6c 6f 6e 67 09 64 | 75 6d 3b 0d 09 09 09 09 |..long.d|um;.....|
|00001880| 09 09 09 09 09 44 65 61 | 63 74 69 76 61 74 65 46 |.....Dea|ctivateF|
|00001890| 6c 6f 61 74 65 72 73 41 | 6e 64 46 69 72 73 74 44 |loatersA|ndFirstD|
|000018a0| 6f 63 75 6d 65 6e 74 57 | 69 6e 64 6f 77 28 29 3b |ocumentW|indow();|
|000018b0| 0d 09 09 09 09 09 09 09 | 09 09 44 65 6c 61 79 28 |........|..Delay(|
|000018c0| 36 30 2c 20 26 64 75 6d | 29 3b 0d 09 09 09 09 09 |60, &dum|);......|
|000018d0| 09 09 09 09 41 63 74 69 | 76 61 74 65 46 6c 6f 61 |....Acti|vateFloa|
|000018e0| 74 65 72 73 41 6e 64 46 | 69 72 73 74 44 6f 63 75 |tersAndF|irstDocu|
|000018f0| 6d 65 6e 74 57 69 6e 64 | 6f 77 28 29 3b 0d 09 09 |mentWind|ow();...|
|00001900| 09 09 09 09 09 09 7d 0d | 09 09 09 09 09 09 09 09 |......}.|........|
|00001910| 65 6c 73 65 20 69 66 28 | 65 76 65 6e 74 2d 3e 6d |else if(|event->m|
|00001920| 6f 64 69 66 69 65 72 73 | 20 26 20 63 6f 6e 74 72 |odifiers| & contr|
|00001930| 6f 6c 4b 65 79 29 0d 09 | 09 09 09 09 09 09 09 7b |olKey)..|.......{|
|00001940| 0d 09 09 09 09 09 09 09 | 09 09 6c 6f 6e 67 09 64 |........|..long.d|
|00001950| 75 6d 3b 0d 09 09 09 09 | 09 09 09 09 09 53 75 73 |um;.....|.....Sus|
|00001960| 70 65 6e 64 46 6c 6f 61 | 74 69 6e 67 57 69 6e 64 |pendFloa|tingWind|
|00001970| 6f 77 73 28 29 3b 0d 09 | 09 09 09 09 09 09 09 09 |ows();..|........|
|00001980| 44 65 6c 61 79 28 36 30 | 2c 20 26 64 75 6d 29 3b |Delay(60|, &dum);|
|00001990| 0d 09 09 09 09 09 09 09 | 09 09 52 65 73 75 6d 65 |........|..Resume|
|000019a0| 46 6c 6f 61 74 69 6e 67 | 57 69 6e 64 6f 77 73 28 |Floating|Windows(|
|000019b0| 29 3b 0d 09 09 09 09 09 | 09 09 09 7d 0d 09 09 09 |);......|...}....|
|000019c0| 09 09 09 09 09 65 6c 73 | 65 0d 09 09 09 09 09 09 |.....els|e.......|
|000019d0| 09 09 7b 0d 09 09 09 09 | 09 09 09 09 09 2f 2f 20 |..{.....|.....// |
|000019e0| 54 68 69 73 20 69 73 20 | 6a 75 73 74 20 69 6e 20 |This is |just in |
|000019f0| 63 61 73 65 20 6d 75 6c | 74 69 70 6c 65 20 77 69 |case mul|tiple wi|
|00001a00| 6e 64 6f 77 73 20 73 68 | 61 72 65 20 74 68 65 20 |ndows sh|are the |
|00001a10| 73 61 6d 65 0d 09 09 09 | 09 09 09 09 09 09 2f 2f |same....|......//|
|00001a20| 20 20 57 69 6e 64 6f 77 | 50 69 63 2c 20 6c 69 6b | Window|Pic, lik|
|00001a30| 65 20 77 68 65 6e 20 74 | 68 65 20 70 72 6f 67 72 |e when t|he progr|
|00001a40| 61 6d 20 69 73 20 73 74 | 61 72 74 65 64 20 75 70 |am is st|arted up|
|00001a50| 20 77 69 74 68 20 74 68 | 65 20 0d 09 09 09 09 09 | with th|e ......|
|00001a60| 09 09 09 09 2f 2f 20 6d | 6f 70 75 73 65 20 62 75 |....// m|opuse bu|
|00001a70| 74 74 6f 6e 20 64 6f 77 | 6e 20 73 6f 20 74 68 61 |tton dow|n so tha|
|00001a80| 74 20 74 68 65 20 74 65 | 73 74 20 77 69 6e 64 6f |t the te|st windo|
|00001a90| 77 73 20 61 72 65 20 75 | 70 0d 09 09 09 09 09 09 |ws are u|p.......|
|00001aa0| 09 09 09 53 65 74 57 69 | 6e 64 6f 77 50 69 63 28 |...SetWi|ndowPic(|
|00001ab0| 77 68 69 63 68 57 69 6e | 64 6f 77 2c 20 6e 69 6c |whichWin|dow, nil|
|00001ac0| 29 3b 0d 09 09 09 09 09 | 09 09 09 09 0d 09 09 09 |);......|........|
|00001ad0| 09 09 09 09 09 09 2f 2f | 20 44 69 73 70 6f 73 65 |......//| Dispose|
|00001ae0| 20 6f 66 20 74 68 65 20 | 77 69 6e 64 6f 77 0d 09 | of the |window..|
|00001af0| 09 09 09 09 09 09 09 09 | 44 69 73 70 6f 73 65 57 |........|DisposeW|
|00001b00| 69 6e 64 6f 77 52 65 66 | 65 72 65 6e 63 65 28 77 |indowRef|erence(w|
|00001b10| 68 69 63 68 57 69 6e 64 | 6f 77 29 3b 0d 09 09 09 |hichWind|ow);....|
|00001b20| 09 09 09 09 09 7d 0d 09 | 09 09 09 09 09 09 09 0d |.....}..|........|
|00001b30| 09 09 09 09 09 09 09 09 | 69 66 28 46 72 6f 6e 74 |........|if(Front|
|00001b40| 4e 6f 6e 46 6c 6f 61 74 | 69 6e 67 57 69 6e 64 6f |NonFloat|ingWindo|
|00001b50| 77 28 29 20 3d 3d 20 6e | 69 6c 29 0d 09 09 09 09 |w() == n|il).....|
|00001b60| 09 09 09 09 09 44 69 73 | 61 62 6c 65 49 74 65 6d |.....Dis|ableItem|
|00001b70| 28 47 65 74 4d 48 61 6e | 64 6c 65 28 72 46 69 6c |(GetMHan|dle(rFil|
|00001b80| 65 4d 65 6e 75 49 44 29 | 2c 20 6b 43 6c 6f 73 65 |eMenuID)|, kClose|
|00001b90| 49 74 65 6d 29 3b 0d 09 | 09 09 09 09 09 09 7d 0d |Item);..|......}.|
|00001ba0| 09 09 09 09 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |.......b|reak;...|
|00001bb0| 63 61 73 65 20 69 6e 5a | 6f 6f 6d 49 6e 3a 0d 09 |case inZ|oomIn:..|
|00001bc0| 09 63 61 73 65 20 69 6e | 5a 6f 6f 6d 4f 75 74 3a |.case in|ZoomOut:|
|00001bd0| 09 09 62 72 65 61 6b 3b | 0d 09 7d 0d 7d 0d 0d 76 |..break;|..}.}..v|
|00001be0| 6f 69 64 09 44 6f 4b 65 | 79 45 76 65 6e 74 28 45 |oid.DoKe|yEvent(E|
|00001bf0| 76 65 6e 74 52 65 63 6f | 72 64 20 2a 65 76 65 6e |ventReco|rd *even|
|00001c00| 74 29 0d 7b 0d 09 6c 6f | 6e 67 09 74 68 65 4b 65 |t).{..lo|ng.theKe|
|00001c10| 79 3b 0d 09 0d 09 74 68 | 65 4b 65 79 20 3d 20 65 |y;....th|eKey = e|
|00001c20| 76 65 6e 74 2d 3e 6d 65 | 73 73 61 67 65 20 26 20 |vent->me|ssage & |
|00001c30| 63 68 61 72 43 6f 64 65 | 4d 61 73 6b 3b 0d 09 69 |charCode|Mask;..i|
|00001c40| 66 20 28 28 65 76 65 6e | 74 2d 3e 6d 6f 64 69 66 |f ((even|t->modif|
|00001c50| 69 65 72 73 20 26 20 63 | 6d 64 4b 65 79 29 20 26 |iers & c|mdKey) &|
|00001c60| 26 20 28 65 76 65 6e 74 | 2d 3e 77 68 61 74 20 3d |& (event|->what =|
|00001c70| 3d 20 6b 65 79 44 6f 77 | 6e 29 29 0d 09 09 44 6f |= keyDow|n))...Do|
|00001c80| 4d 65 6e 75 43 6f 6d 6d | 61 6e 64 28 4d 65 6e 75 |MenuComm|and(Menu|
|00001c90| 4b 65 79 28 28 63 68 61 | 72 29 20 74 68 65 4b 65 |Key((cha|r) theKe|
|00001ca0| 79 29 29 3b 0d 7d 0d 0d | 76 6f 69 64 20 44 6f 41 |y));.}..|void DoA|
|00001cb0| 63 74 69 76 61 74 65 45 | 76 65 6e 74 28 45 76 65 |ctivateE|vent(Eve|
|00001cc0| 6e 74 52 65 63 6f 72 64 | 20 2a 65 76 65 6e 74 29 |ntRecord| *event)|
|00001cd0| 0d 7b 0d 09 42 6f 6f 6c | 65 61 6e 09 61 63 74 69 |.{..Bool|ean.acti|
|00001ce0| 76 61 74 69 6e 67 20 3d | 20 66 61 6c 73 65 3b 0d |vating =| false;.|
|00001cf0| 09 0d 09 69 66 20 28 47 | 65 74 57 69 6e 64 6f 77 |...if (G|etWindow|
|00001d00| 4b 69 6e 64 28 28 57 69 | 6e 64 6f 77 52 65 66 29 |Kind((Wi|ndowRef)|
|00001d10| 20 65 76 65 6e 74 2d 3e | 6d 65 73 73 61 67 65 29 | event->|message)|
|00001d20| 20 21 3d 20 64 69 61 6c | 6f 67 4b 69 6e 64 29 20 | != dial|ogKind) |
|00001d30| 7b 0d 09 09 69 66 20 28 | 65 76 65 6e 74 2d 3e 6d |{...if (|event->m|
|00001d40| 6f 64 69 66 69 65 72 73 | 20 26 20 61 63 74 69 76 |odifiers| & activ|
|00001d50| 65 46 6c 61 67 29 0d 09 | 09 09 61 63 74 69 76 61 |eFlag)..|..activa|
|00001d60| 74 69 6e 67 20 3d 20 74 | 72 75 65 3b 0d 09 09 0d |ting = t|rue;....|
|00001d70| 09 09 44 65 62 75 67 53 | 74 72 28 22 5c 70 47 6f |..DebugS|tr("\pGo|
|00001d80| 74 20 61 63 74 69 76 61 | 74 65 20 66 72 6f 6d 20 |t activa|te from |
|00001d90| 65 76 65 6e 74 20 6c 6f | 6f 70 2e 22 29 3b 0d 09 |event lo|op.");..|
|00001da0| 09 0d 09 09 41 63 74 69 | 76 61 74 65 45 76 65 6e |....Acti|vateEven|
|00001db0| 74 48 61 6e 64 6c 65 72 | 28 28 57 69 6e 64 6f 77 |tHandler|((Window|
|00001dc0| 52 65 66 29 20 65 76 65 | 6e 74 2d 3e 6d 65 73 73 |Ref) eve|nt->mess|
|00001dd0| 61 67 65 2c 20 61 63 74 | 69 76 61 74 69 6e 67 29 |age, act|ivating)|
|00001de0| 3b 0d 09 7d 0d 7d 0d 0d | 70 61 73 63 61 6c 20 76 |;..}.}..|pascal v|
|00001df0| 6f 69 64 20 41 63 74 69 | 76 61 74 65 45 76 65 6e |oid Acti|vateEven|
|00001e00| 74 48 61 6e 64 6c 65 72 | 28 57 69 6e 64 6f 77 52 |tHandler|(WindowR|
|00001e10| 65 66 20 74 68 65 57 69 | 6e 64 6f 77 2c 20 42 6f |ef theWi|ndow, Bo|
|00001e20| 6f 6c 65 61 6e 20 61 63 | 74 69 76 61 74 65 57 69 |olean ac|tivateWi|
|00001e30| 6e 64 6f 77 29 0d 7b 0d | 09 47 72 61 66 50 74 72 |ndow).{.|.GrafPtr|
|00001e40| 09 63 75 72 72 65 6e 74 | 50 6f 72 74 3b 0d 09 0d |.current|Port;...|
|00001e50| 09 47 65 74 50 6f 72 74 | 28 26 63 75 72 72 65 6e |.GetPort|(¤|
|00001e60| 74 50 6f 72 74 29 3b 0d | 09 53 65 74 50 6f 72 74 |tPort);.|.SetPort|
|00001e70| 28 28 47 72 61 66 50 74 | 72 29 20 74 68 65 57 69 |((GrafPt|r) theWi|
|00001e80| 6e 64 6f 77 29 3b 0d 09 | 0d 09 44 72 61 77 57 69 |ndow);..|..DrawWi|
|00001e90| 6e 64 6f 77 43 6f 6e 74 | 65 6e 74 28 61 63 74 69 |ndowCont|ent(acti|
|00001ea0| 76 61 74 65 57 69 6e 64 | 6f 77 29 3b 0d 09 0d 09 |vateWind|ow);....|
|00001eb0| 69 66 20 28 61 63 74 69 | 76 61 74 65 57 69 6e 64 |if (acti|vateWind|
|00001ec0| 6f 77 20 3d 3d 20 66 61 | 6c 73 65 29 0d 09 09 53 |ow == fa|lse)...S|
|00001ed0| 65 74 50 6f 72 74 28 63 | 75 72 72 65 6e 74 50 6f |etPort(c|urrentPo|
|00001ee0| 72 74 29 3b 0d 7d 0d 0d | 70 61 73 63 61 6c 20 76 |rt);.}..|pascal v|
|00001ef0| 6f 69 64 09 52 65 63 6f | 72 64 69 6e 67 46 6c 6f |oid.Reco|rdingFlo|
|00001f00| 61 74 65 72 41 63 74 69 | 76 61 74 65 48 61 6e 64 |aterActi|vateHand|
|00001f10| 6c 65 72 28 57 69 6e 64 | 6f 77 52 65 66 20 74 68 |ler(Wind|owRef th|
|00001f20| 65 57 69 6e 64 6f 77 2c | 20 42 6f 6f 6c 65 61 6e |eWindow,| Boolean|
|00001f30| 20 61 63 74 69 76 61 74 | 65 57 69 6e 64 6f 77 29 | activat|eWindow)|
|00001f40| 0d 7b 0d 09 47 72 61 66 | 50 74 72 09 09 63 75 72 |.{..Graf|Ptr..cur|
|00001f50| 72 65 6e 74 50 6f 72 74 | 3b 0d 09 50 69 63 48 61 |rentPort|;..PicHa|
|00001f60| 6e 64 6c 65 09 72 65 63 | 6f 72 64 69 6e 67 43 6f |ndle.rec|ordingCo|
|00001f70| 6e 74 72 6f 6c 73 50 69 | 63 74 75 72 65 3b 0d 09 |ntrolsPi|cture;..|
|00001f80| 73 68 6f 72 74 09 09 77 | 68 69 63 68 50 69 63 74 |short..w|hichPict|
|00001f90| 75 72 65 3b 0d 09 0d 09 | 47 65 74 50 6f 72 74 28 |ure;....|GetPort(|
|00001fa0| 26 63 75 72 72 65 6e 74 | 50 6f 72 74 29 3b 0d 09 |¤t|Port);..|
|00001fb0| 53 65 74 50 6f 72 74 28 | 28 47 72 61 66 50 74 72 |SetPort(|(GrafPtr|
|00001fc0| 29 20 74 68 65 57 69 6e | 64 6f 77 29 3b 0d 09 0d |) theWin|dow);...|
|00001fd0| 09 69 66 20 28 61 63 74 | 69 76 61 74 65 57 69 6e |.if (act|ivateWin|
|00001fe0| 64 6f 77 20 3d 3d 20 74 | 72 75 65 29 0d 09 09 77 |dow == t|rue)...w|
|00001ff0| 68 69 63 68 50 69 63 74 | 75 72 65 20 3d 20 31 32 |hichPict|ure = 12|
|00002000| 38 3b 0d 09 65 6c 73 65 | 0d 09 09 77 68 69 63 68 |8;..else|...which|
|00002010| 50 69 63 74 75 72 65 20 | 3d 20 31 32 39 3b 0d 09 |Picture |= 129;..|
|00002020| 72 65 63 6f 72 64 69 6e | 67 43 6f 6e 74 72 6f 6c |recordin|gControl|
|00002030| 73 50 69 63 74 75 72 65 | 20 3d 20 47 65 74 50 69 |sPicture| = GetPi|
|00002040| 63 74 75 72 65 28 77 68 | 69 63 68 50 69 63 74 75 |cture(wh|ichPictu|
|00002050| 72 65 29 3b 0d 09 0d 09 | 44 72 61 77 50 69 63 74 |re);....|DrawPict|
|00002060| 75 72 65 28 72 65 63 6f | 72 64 69 6e 67 43 6f 6e |ure(reco|rdingCon|
|00002070| 74 72 6f 6c 73 50 69 63 | 74 75 72 65 2c 20 26 28 |trolsPic|ture, &(|
|00002080| 28 2a 2a 72 65 63 6f 72 | 64 69 6e 67 43 6f 6e 74 |(**recor|dingCont|
|00002090| 72 6f 6c 73 50 69 63 74 | 75 72 65 29 2e 70 69 63 |rolsPict|ure).pic|
|000020a0| 46 72 61 6d 65 29 29 3b | 0d 09 53 65 74 57 69 6e |Frame));|..SetWin|
|000020b0| 64 6f 77 50 69 63 28 74 | 68 65 57 69 6e 64 6f 77 |dowPic(t|heWindow|
|000020c0| 2c 20 72 65 63 6f 72 64 | 69 6e 67 43 6f 6e 74 72 |, record|ingContr|
|000020d0| 6f 6c 73 50 69 63 74 75 | 72 65 29 3b 0d 09 0d 09 |olsPictu|re);....|
|000020e0| 69 66 20 28 61 63 74 69 | 76 61 74 65 57 69 6e 64 |if (acti|vateWind|
|000020f0| 6f 77 20 3d 3d 20 66 61 | 6c 73 65 29 0d 09 09 53 |ow == fa|lse)...S|
|00002100| 65 74 50 6f 72 74 28 63 | 75 72 72 65 6e 74 50 6f |etPort(c|urrentPo|
|00002110| 72 74 29 3b 0d 7d 0d 0d | 70 61 73 63 61 6c 20 76 |rt);.}..|pascal v|
|00002120| 6f 69 64 09 54 6f 6f 6c | 73 46 6c 6f 61 74 65 72 |oid.Tool|sFloater|
|00002130| 41 63 74 69 76 61 74 65 | 48 61 6e 64 6c 65 72 28 |Activate|Handler(|
|00002140| 57 69 6e 64 6f 77 52 65 | 66 20 74 68 65 57 69 6e |WindowRe|f theWin|
|00002150| 64 6f 77 2c 20 42 6f 6f | 6c 65 61 6e 20 61 63 74 |dow, Boo|lean act|
|00002160| 69 76 61 74 65 57 69 6e | 64 6f 77 29 0d 7b 0d 09 |ivateWin|dow).{..|
|00002170| 47 72 61 66 50 74 72 09 | 09 63 75 72 72 65 6e 74 |GrafPtr.|.current|
|00002180| 50 6f 72 74 3b 0d 09 50 | 69 63 48 61 6e 64 6c 65 |Port;..P|icHandle|
|00002190| 09 74 6f 6f 6c 73 50 69 | 63 74 75 72 65 3b 0d 09 |.toolsPi|cture;..|
|000021a0| 73 68 6f 72 74 09 09 77 | 68 69 63 68 50 69 63 74 |short..w|hichPict|
|000021b0| 75 72 65 3b 0d 09 0d 09 | 47 65 74 50 6f 72 74 28 |ure;....|GetPort(|
|000021c0| 26 63 75 72 72 65 6e 74 | 50 6f 72 74 29 3b 0d 09 |¤t|Port);..|
|000021d0| 53 65 74 50 6f 72 74 28 | 28 47 72 61 66 50 74 72 |SetPort(|(GrafPtr|
|000021e0| 29 20 74 68 65 57 69 6e | 64 6f 77 29 3b 0d 09 0d |) theWin|dow);...|
|000021f0| 09 69 66 20 28 61 63 74 | 69 76 61 74 65 57 69 6e |.if (act|ivateWin|
|00002200| 64 6f 77 20 3d 3d 20 74 | 72 75 65 29 0d 09 09 77 |dow == t|rue)...w|
|00002210| 68 69 63 68 50 69 63 74 | 75 72 65 20 3d 20 31 33 |hichPict|ure = 13|
|00002220| 30 3b 0d 09 65 6c 73 65 | 0d 09 09 77 68 69 63 68 |0;..else|...which|
|00002230| 50 69 63 74 75 72 65 20 | 3d 20 31 33 31 3b 0d 09 |Picture |= 131;..|
|00002240| 74 6f 6f 6c 73 50 69 63 | 74 75 72 65 20 3d 20 47 |toolsPic|ture = G|
|00002250| 65 74 50 69 63 74 75 72 | 65 28 77 68 69 63 68 50 |etPictur|e(whichP|
|00002260| 69 63 74 75 72 65 29 3b | 0d 09 0d 09 44 72 61 77 |icture);|....Draw|
|00002270| 50 69 63 74 75 72 65 28 | 74 6f 6f 6c 73 50 69 63 |Picture(|toolsPic|
|00002280| 74 75 72 65 2c 20 26 28 | 28 2a 2a 74 6f 6f 6c 73 |ture, &(|(**tools|
|00002290| 50 69 63 74 75 72 65 29 | 2e 70 69 63 46 72 61 6d |Picture)|.picFram|
|000022a0| 65 29 29 3b 0d 09 53 65 | 74 57 69 6e 64 6f 77 50 |e));..Se|tWindowP|
|000022b0| 69 63 28 20 74 68 65 57 | 69 6e 64 6f 77 2c 20 74 |ic( theW|indow, t|
|000022c0| 6f 6f 6c 73 50 69 63 74 | 75 72 65 29 3b 0d 09 0d |oolsPict|ure);...|
|000022d0| 09 69 66 20 28 61 63 74 | 69 76 61 74 65 57 69 6e |.if (act|ivateWin|
|000022e0| 64 6f 77 20 3d 3d 20 66 | 61 6c 73 65 29 0d 09 09 |dow == f|alse)...|
|000022f0| 53 65 74 50 6f 72 74 28 | 63 75 72 72 65 6e 74 50 |SetPort(|currentP|
|00002300| 6f 72 74 29 3b 0d 7d 0d | 0d 70 61 73 63 61 6c 20 |ort);.}.|.pascal |
|00002310| 76 6f 69 64 09 54 65 73 | 74 46 6c 6f 61 74 65 72 |void.Tes|tFloater|
|00002320| 41 63 74 69 76 61 74 65 | 48 61 6e 64 6c 65 72 28 |Activate|Handler(|
|00002330| 57 69 6e 64 6f 77 52 65 | 66 20 74 68 65 57 69 6e |WindowRe|f theWin|
|00002340| 64 6f 77 2c 20 42 6f 6f | 6c 65 61 6e 20 61 63 74 |dow, Boo|lean act|
|00002350| 69 76 61 74 65 57 69 6e | 64 6f 77 29 0d 7b 0d 09 |ivateWin|dow).{..|
|00002360| 47 72 61 66 50 74 72 09 | 09 63 75 72 72 65 6e 74 |GrafPtr.|.current|
|00002370| 50 6f 72 74 3b 0d 09 50 | 69 63 48 61 6e 64 6c 65 |Port;..P|icHandle|
|00002380| 09 64 61 76 65 50 69 63 | 74 75 72 65 3b 0d 09 73 |.davePic|ture;..s|
|00002390| 68 6f 72 74 09 09 77 68 | 69 63 68 50 69 63 74 75 |hort..wh|ichPictu|
|000023a0| 72 65 3b 0d 09 0d 09 47 | 65 74 50 6f 72 74 28 26 |re;....G|etPort(&|
|000023b0| 63 75 72 72 65 6e 74 50 | 6f 72 74 29 3b 0d 09 53 |currentP|ort);..S|
|000023c0| 65 74 50 6f 72 74 28 28 | 47 72 61 66 50 74 72 29 |etPort((|GrafPtr)|
|000023d0| 20 74 68 65 57 69 6e 64 | 6f 77 29 3b 0d 09 0d 09 | theWind|ow);....|
|000023e0| 69 66 20 28 61 63 74 69 | 76 61 74 65 57 69 6e 64 |if (acti|vateWind|
|000023f0| 6f 77 20 3d 3d 20 74 72 | 75 65 29 0d 09 09 77 68 |ow == tr|ue)...wh|
|00002400| 69 63 68 50 69 63 74 75 | 72 65 20 3d 20 31 33 32 |ichPictu|re = 132|
|00002410| 3b 0d 09 65 6c 73 65 0d | 09 09 77 68 69 63 68 50 |;..else.|..whichP|
|00002420| 69 63 74 75 72 65 20 3d | 20 31 33 33 3b 0d 09 64 |icture =| 133;..d|
|00002430| 61 76 65 50 69 63 74 75 | 72 65 20 3d 20 47 65 74 |avePictu|re = Get|
|00002440| 50 69 63 74 75 72 65 28 | 77 68 69 63 68 50 69 63 |Picture(|whichPic|
|00002450| 74 75 72 65 29 3b 0d 09 | 0d 09 44 72 61 77 50 69 |ture);..|..DrawPi|
|00002460| 63 74 75 72 65 28 64 61 | 76 65 50 69 63 74 75 72 |cture(da|vePictur|
|00002470| 65 2c 20 26 28 28 2a 2a | 64 61 76 65 50 69 63 74 |e, &((**|davePict|
|00002480| 75 72 65 29 2e 70 69 63 | 46 72 61 6d 65 29 29 3b |ure).pic|Frame));|
|00002490| 0d 09 53 65 74 57 69 6e | 64 6f 77 50 69 63 28 74 |..SetWin|dowPic(t|
|000024a0| 68 65 57 69 6e 64 6f 77 | 2c 20 64 61 76 65 50 69 |heWindow|, davePi|
|000024b0| 63 74 75 72 65 29 3b 0d | 09 0d 09 69 66 20 28 61 |cture);.|...if (a|
|000024c0| 63 74 69 76 61 74 65 57 | 69 6e 64 6f 77 20 3d 3d |ctivateW|indow ==|
|000024d0| 20 66 61 6c 73 65 29 0d | 09 09 53 65 74 50 6f 72 | false).|..SetPor|
|000024e0| 74 28 63 75 72 72 65 6e | 74 50 6f 72 74 29 3b 0d |t(curren|tPort);.|
|000024f0| 7d 0d 0d 76 6f 69 64 09 | 44 6f 55 70 64 61 74 65 |}..void.|DoUpdate|
|00002500| 45 76 65 6e 74 28 45 76 | 65 6e 74 52 65 63 6f 72 |Event(Ev|entRecor|
|00002510| 64 20 2a 65 76 65 6e 74 | 29 0d 7b 0d 09 57 69 6e |d *event|).{..Win|
|00002520| 64 6f 77 52 65 66 09 74 | 68 65 57 69 6e 64 6f 77 |dowRef.t|heWindow|
|00002530| 20 3d 20 28 57 69 6e 64 | 6f 77 52 65 66 29 65 76 | = (Wind|owRef)ev|
|00002540| 65 6e 74 2d 3e 6d 65 73 | 73 61 67 65 3b 0d 09 0d |ent->mes|sage;...|
|00002550| 09 53 65 74 50 6f 72 74 | 57 69 6e 64 6f 77 50 6f |.SetPort|WindowPo|
|00002560| 72 74 28 74 68 65 57 69 | 6e 64 6f 77 29 3b 0d 09 |rt(theWi|ndow);..|
|00002570| 42 65 67 69 6e 55 70 64 | 61 74 65 28 74 68 65 57 |BeginUpd|ate(theW|
|00002580| 69 6e 64 6f 77 29 3b 0d | 09 09 69 66 28 47 65 74 |indow);.|..if(Get|
|00002590| 45 78 74 57 52 65 66 43 | 6f 6e 28 74 68 65 57 69 |ExtWRefC|on(theWi|
|000025a0| 6e 64 6f 77 29 20 3d 3d | 20 27 44 41 56 45 27 29 |ndow) ==| 'DAVE')|
|000025b0| 0d 09 09 09 44 72 61 77 | 43 6f 6e 74 72 6f 6c 73 |....Draw|Controls|
|000025c0| 28 74 68 65 57 69 6e 64 | 6f 77 29 3b 0d 09 09 65 |(theWind|ow);...e|
|000025d0| 6c 73 65 0d 09 09 7b 0d | 09 09 45 72 61 73 65 52 |lse...{.|..EraseR|
|000025e0| 65 63 74 28 26 28 47 65 | 74 57 69 6e 64 6f 77 50 |ect(&(Ge|tWindowP|
|000025f0| 6f 72 74 28 74 68 65 57 | 69 6e 64 6f 77 29 2d 3e |ort(theW|indow)->|
|00002600| 70 6f 72 74 52 65 63 74 | 29 29 3b 0d 09 09 44 72 |portRect|));...Dr|
|00002610| 61 77 57 69 6e 64 6f 77 | 43 6f 6e 74 65 6e 74 28 |awWindow|Content(|
|00002620| 49 73 57 69 6e 64 6f 77 | 48 69 6c 69 74 65 64 28 |IsWindow|Hilited(|
|00002630| 28 57 69 6e 64 6f 77 52 | 65 66 29 74 68 65 57 69 |(WindowR|ef)theWi|
|00002640| 6e 64 6f 77 29 29 3b 0d | 09 09 7d 0d 09 45 6e 64 |ndow));.|..}..End|
|00002650| 55 70 64 61 74 65 28 74 | 68 65 57 69 6e 64 6f 77 |Update(t|heWindow|
|00002660| 29 3b 0d 7d 0d 0d 76 6f | 69 64 09 44 72 61 77 57 |);.}..vo|id.DrawW|
|00002670| 69 6e 64 6f 77 43 6f 6e | 74 65 6e 74 28 42 6f 6f |indowCon|tent(Boo|
|00002680| 6c 65 61 6e 20 64 6f 46 | 69 6c 6c 29 0d 7b 0d 09 |lean doF|ill).{..|
|00002690| 52 65 63 74 09 74 65 6d | 70 52 65 63 74 3b 0d 0d |Rect.tem|pRect;..|
|000026a0| 09 53 65 74 52 65 63 74 | 28 26 74 65 6d 70 52 65 |.SetRect|(&tempRe|
|000026b0| 63 74 2c 20 35 2c 20 35 | 2c 20 35 30 2c 20 35 30 |ct, 5, 5|, 50, 50|
|000026c0| 29 3b 0d 09 0d 09 69 66 | 20 28 64 6f 46 69 6c 6c |);....if| (doFill|
|000026d0| 29 20 2f 2f 20 3d 3d 20 | 74 72 75 65 29 20 73 65 |) // == |true) se|
|000026e0| 65 20 6e 6f 74 65 73 20 | 69 6e 20 57 69 6e 64 6f |e notes |in Windo|
|000026f0| 77 45 78 74 65 6e 73 69 | 6f 6e 73 2e 63 0d 09 09 |wExtensi|ons.c...|
|00002700| 46 69 6c 6c 52 65 63 74 | 28 26 74 65 6d 70 52 65 |FillRect|(&tempRe|
|00002710| 63 74 2c 20 26 28 71 64 | 2e 62 6c 61 63 6b 29 29 |ct, &(qd|.black))|
|00002720| 3b 0d 09 65 6c 73 65 20 | 7b 0d 09 09 46 72 61 6d |;..else |{...Fram|
|00002730| 65 52 65 63 74 28 26 74 | 65 6d 70 52 65 63 74 29 |eRect(&t|empRect)|
|00002740| 3b 0d 09 09 49 6e 73 65 | 74 52 65 63 74 28 26 74 |;...Inse|tRect(&t|
|00002750| 65 6d 70 52 65 63 74 2c | 20 31 2c 20 31 29 3b 0d |empRect,| 1, 1);.|
|00002760| 09 09 45 72 61 73 65 52 | 65 63 74 28 26 74 65 6d |..EraseR|ect(&tem|
|00002770| 70 52 65 63 74 29 3b 0d | 09 7d 0d 7d 0d 0d 76 6f |pRect);.|.}.}..vo|
|00002780| 69 64 09 44 6f 4f 53 45 | 76 65 6e 74 28 45 76 65 |id.DoOSE|vent(Eve|
|00002790| 6e 74 52 65 63 6f 72 64 | 20 2a 65 76 65 6e 74 29 |ntRecord| *event)|
|000027a0| 0d 7b 0d 09 73 77 69 74 | 63 68 20 28 28 65 76 65 |.{..swit|ch ((eve|
|000027b0| 6e 74 2d 3e 6d 65 73 73 | 61 67 65 20 3e 3e 20 32 |nt->mess|age >> 2|
|000027c0| 34 29 20 26 20 30 78 46 | 46 29 20 7b 0d 09 09 63 |4) & 0xF|F) {...c|
|000027d0| 61 73 65 20 6d 6f 75 73 | 65 4d 6f 76 65 64 4d 65 |ase mous|eMovedMe|
|000027e0| 73 73 61 67 65 3a 09 09 | 62 72 65 61 6b 3b 0d 09 |ssage:..|break;..|
|000027f0| 09 63 61 73 65 20 73 75 | 73 70 65 6e 64 52 65 73 |.case su|spendRes|
|00002800| 75 6d 65 4d 65 73 73 61 | 67 65 3a 09 69 66 20 28 |umeMessa|ge:.if (|
|00002810| 65 76 65 6e 74 2d 3e 6d | 65 73 73 61 67 65 20 26 |event->m|essage &|
|00002820| 20 72 65 73 75 6d 65 46 | 6c 61 67 29 20 7b 0d 09 | resumeF|lag) {..|
|00002830| 09 09 09 09 09 09 09 09 | 09 67 49 6e 42 61 63 6b |........|.gInBack|
|00002840| 67 72 6f 75 6e 64 20 3d | 20 66 61 6c 73 65 3b 0d |ground =| false;.|
|00002850| 09 09 09 09 09 09 09 09 | 09 09 67 54 69 6d 65 54 |........|..gTimeT|
|00002860| 6f 44 69 61 6c 6f 67 44 | 69 73 6d 69 73 73 61 6c |oDialogD|ismissal|
|00002870| 20 3d 20 30 3b 0d 09 09 | 09 09 09 09 09 09 09 09 | = 0;...|........|
|00002880| 44 69 73 61 62 6c 65 49 | 74 65 6d 28 47 65 74 4d |DisableI|tem(GetM|
|00002890| 48 61 6e 64 6c 65 28 72 | 45 64 69 74 4d 65 6e 75 |Handle(r|EditMenu|
|000028a0| 49 44 29 2c 20 30 29 3b | 0d 09 09 09 09 09 09 09 |ID), 0);|........|
|000028b0| 09 09 09 44 72 61 77 4d | 65 6e 75 42 61 72 28 29 |...DrawM|enuBar()|
|000028c0| 3b 0d 09 09 09 09 09 09 | 09 09 09 09 52 65 73 75 |;.......|....Resu|
|000028d0| 6d 65 46 6c 6f 61 74 69 | 6e 67 57 69 6e 64 6f 77 |meFloati|ngWindow|
|000028e0| 73 28 29 3b 0d 09 09 09 | 09 09 09 09 09 09 09 53 |s();....|.......S|
|000028f0| 65 74 43 75 72 73 6f 72 | 28 26 71 64 2e 61 72 72 |etCursor|(&qd.arr|
|00002900| 6f 77 29 3b 0d 09 09 09 | 09 09 09 09 09 09 09 2f |ow);....|......./|
|00002910| 2f 20 52 65 6d 6f 76 65 | 20 6e 6f 74 69 66 69 63 |/ Remove| notific|
|00002920| 61 74 69 6f 6e 20 69 66 | 20 69 74 20 65 78 69 73 |ation if| it exis|
|00002930| 74 73 0d 09 09 09 09 09 | 09 09 09 09 09 69 66 28 |ts......|.....if(|
|00002940| 67 4e 6f 74 69 66 69 63 | 61 74 69 6f 6e 50 6f 73 |gNotific|ationPos|
|00002950| 74 65 64 29 0d 09 09 09 | 09 09 09 09 09 09 09 7b |ted)....|.......{|
|00002960| 0d 09 09 09 09 09 09 09 | 09 09 09 09 4e 4d 52 65 |........|....NMRe|
|00002970| 6d 6f 76 65 28 26 67 4e | 6f 74 69 66 69 63 61 74 |move(&gN|otificat|
|00002980| 69 6f 6e 52 65 63 29 3b | 0d 09 09 09 09 09 09 09 |ionRec);|........|
|00002990| 09 09 09 09 67 4e 6f 74 | 69 66 69 63 61 74 69 6f |....gNot|ificatio|
|000029a0| 6e 50 6f 73 74 65 64 20 | 3d 20 66 61 6c 73 65 3b |nPosted |= false;|
|000029b0| 0d 09 09 09 09 09 09 09 | 09 09 09 7d 0d 09 09 09 |........|...}....|
|000029c0| 09 09 09 09 09 09 7d 0d | 09 09 09 09 09 09 09 09 |......}.|........|
|000029d0| 09 65 6c 73 65 20 7b 0d | 09 09 09 09 09 09 09 09 |.else {.|........|
|000029e0| 09 09 67 49 6e 42 61 63 | 6b 67 72 6f 75 6e 64 20 |..gInBac|kground |
|000029f0| 3d 20 74 72 75 65 3b 0d | 09 09 09 09 09 09 09 09 |= true;.|........|
|00002a00| 09 09 69 66 20 28 47 65 | 74 57 69 6e 64 6f 77 4b |..if (Ge|tWindowK|
|00002a10| 69 6e 64 28 46 72 6f 6e | 74 57 69 6e 64 6f 77 28 |ind(Fron|tWindow(|
|00002a20| 29 29 20 3d 3d 20 64 69 | 61 6c 6f 67 4b 69 6e 64 |)) == di|alogKind|
|00002a30| 29 0d 09 09 09 09 09 09 | 09 09 09 09 09 67 54 69 |).......|.....gTi|
|00002a40| 6d 65 54 6f 44 69 61 6c | 6f 67 44 69 73 6d 69 73 |meToDial|ogDismis|
|00002a50| 73 61 6c 20 3d 20 35 3b | 0d 09 09 09 09 09 09 09 |sal = 5;|........|
|00002a60| 09 09 09 53 75 73 70 65 | 6e 64 46 6c 6f 61 74 69 |...Suspe|ndFloati|
|00002a70| 6e 67 57 69 6e 64 6f 77 | 73 28 29 3b 0d 09 09 09 |ngWindow|s();....|
|00002a80| 09 09 09 09 09 09 7d 0d | 09 09 09 09 09 09 09 09 |......}.|........|
|00002a90| 09 62 72 65 61 6b 3b 0d | 09 7d 0d 7d 0d 0d 0d 2f |.break;.|.}.}.../|
|00002aa0| 2a 09 48 61 6e 64 6c 65 | 20 68 69 67 68 20 6c 65 |*.Handle| high le|
|00002ab0| 76 65 6c 20 65 76 65 6e | 74 73 20 2a 2f 0d 0d 76 |vel even|ts */..v|
|00002ac0| 6f 69 64 09 44 6f 48 69 | 67 68 4c 65 76 65 6c 45 |oid.DoHi|ghLevelE|
|00002ad0| 76 65 6e 74 28 45 76 65 | 6e 74 52 65 63 6f 72 64 |vent(Eve|ntRecord|
|00002ae0| 20 2a 65 76 65 6e 74 29 | 0d 7b 0d 09 4f 53 45 72 | *event)|.{..OSEr|
|00002af0| 72 09 41 45 50 72 6f 63 | 65 73 73 52 65 73 75 6c |r.AEProc|essResul|
|00002b00| 74 3b 0d 09 0d 09 73 77 | 69 74 63 68 09 28 65 76 |t;....sw|itch.(ev|
|00002b10| 65 6e 74 2d 3e 6d 65 73 | 73 61 67 65 29 20 7b 0d |ent->mes|sage) {.|
|00002b20| 09 09 63 61 73 65 20 6b | 43 6f 72 65 45 76 65 6e |..case k|CoreEven|
|00002b30| 74 43 6c 61 73 73 3a 09 | 41 45 50 72 6f 63 65 73 |tClass:.|AEProces|
|00002b40| 73 52 65 73 75 6c 74 20 | 3d 20 41 45 50 72 6f 63 |sResult |= AEProc|
|00002b50| 65 73 73 41 70 70 6c 65 | 45 76 65 6e 74 28 65 76 |essApple|Event(ev|
|00002b60| 65 6e 74 29 3b 09 2f 2a | 09 48 61 6e 64 6c 65 20 |ent);./*|.Handle |
|00002b70| 63 6f 72 65 20 41 70 70 | 6c 65 45 76 65 6e 74 73 |core App|leEvents|
|00002b80| 20 2a 2f 0d 09 09 09 09 | 09 09 09 09 62 72 65 61 | */.....|....brea|
|00002b90| 6b 3b 0d 09 09 63 61 73 | 65 20 72 53 65 63 74 69 |k;...cas|e rSecti|
|00002ba0| 6f 6e 54 79 70 65 3a 09 | 09 62 72 65 61 6b 3b 09 |onType:.|.break;.|
|00002bb0| 09 09 09 09 09 09 09 09 | 09 09 2f 2a 09 48 61 6e |........|../*.Han|
|00002bc0| 64 6c 65 20 45 64 69 74 | 69 6f 6e 20 4d 61 6e 61 |dle Edit|ion Mana|
|00002bd0| 67 65 72 20 41 70 70 6c | 65 45 76 65 6e 74 73 20 |ger Appl|eEvents |
|00002be0| 2a 2f 0d 09 09 64 65 66 | 61 75 6c 74 3a 09 09 09 |*/...def|ault:...|
|00002bf0| 09 48 61 6e 64 6c 65 47 | 65 6e 65 72 69 63 48 69 |.HandleG|enericHi|
|00002c00| 67 68 4c 65 76 65 6c 45 | 76 65 6e 74 28 65 76 65 |ghLevelE|vent(eve|
|00002c10| 6e 74 29 3b 09 09 09 09 | 2f 2a 09 4f 74 68 65 72 |nt);....|/*.Other|
|00002c20| 20 68 69 67 68 20 6c 65 | 76 65 6c 20 65 76 65 6e | high le|vel even|
|00002c30| 74 73 20 2a 2f 0d 09 09 | 09 09 09 09 09 09 62 72 |ts */...|......br|
|00002c40| 65 61 6b 3b 0d 09 7d 0d | 7d 0d 0d 76 6f 69 64 09 |eak;..}.|}..void.|
|00002c50| 48 61 6e 64 6c 65 47 65 | 6e 65 72 69 63 48 69 67 |HandleGe|nericHig|
|00002c60| 68 4c 65 76 65 6c 45 76 | 65 6e 74 28 45 76 65 6e |hLevelEv|ent(Even|
|00002c70| 74 52 65 63 6f 72 64 20 | 2a 65 76 65 6e 74 29 0d |tRecord |*event).|
|00002c80| 7b 0d 09 54 61 72 67 65 | 74 49 44 09 65 76 65 6e |{..Targe|tID.even|
|00002c90| 74 53 65 6e 64 65 72 49 | 6e 66 6f 3b 0d 09 75 6e |tSenderI|nfo;..un|
|00002ca0| 73 69 67 6e 65 64 09 6c | 6f 6e 67 20 65 76 65 6e |signed.l|ong even|
|00002cb0| 74 49 64 65 6e 74 69 66 | 69 65 72 3b 0d 09 50 74 |tIdentif|ier;..Pt|
|00002cc0| 72 09 09 09 64 61 74 61 | 42 75 66 66 65 72 3b 0d |r...data|Buffer;.|
|00002cd0| 09 75 6e 73 69 67 6e 65 | 64 09 6c 6f 6e 67 20 64 |.unsigne|d.long d|
|00002ce0| 61 74 61 53 69 7a 65 3b | 0d 09 4f 53 45 72 72 09 |ataSize;|..OSErr.|
|00002cf0| 48 4c 45 76 65 6e 74 45 | 72 72 6f 72 3b 0d 09 0d |HLEventE|rror;...|
|00002d00| 09 64 61 74 61 53 69 7a | 65 20 3d 20 30 3b 0d 09 |.dataSiz|e = 0;..|
|00002d10| 64 61 74 61 42 75 66 66 | 65 72 20 3d 20 6e 69 6c |dataBuff|er = nil|
|00002d20| 3b 0d 09 48 4c 45 76 65 | 6e 74 45 72 72 6f 72 20 |;..HLEve|ntError |
|00002d30| 3d 20 41 63 63 65 70 74 | 48 69 67 68 4c 65 76 65 |= Accept|HighLeve|
|00002d40| 6c 45 76 65 6e 74 28 26 | 65 76 65 6e 74 53 65 6e |lEvent(&|eventSen|
|00002d50| 64 65 72 49 6e 66 6f 2c | 20 26 65 76 65 6e 74 49 |derInfo,| &eventI|
|00002d60| 64 65 6e 74 69 66 69 65 | 72 2c 20 64 61 74 61 42 |dentifie|r, dataB|
|00002d70| 75 66 66 65 72 2c 20 26 | 64 61 74 61 53 69 7a 65 |uffer, &|dataSize|
|00002d80| 29 3b 0d 09 0d 09 2f 2a | 0d 09 09 53 69 6e 63 65 |);..../*|...Since|
|00002d90| 20 77 65 20 64 6f 6e d5 | 74 20 6b 6e 6f 77 20 68 | we don.|t know h|
|00002da0| 6f 77 20 6d 75 63 68 20 | 64 61 74 61 20 69 73 20 |ow much |data is |
|00002db0| 63 6f 6d 69 6e 67 20 69 | 6e 2c 20 63 61 6c 6c 20 |coming i|n, call |
|00002dc0| 41 63 63 65 70 74 48 69 | 67 68 4c 65 76 65 6c 45 |AcceptHi|ghLevelE|
|00002dd0| 76 65 6e 74 20 6f 6e 63 | 65 20 74 6f 0d 09 09 66 |vent onc|e to...f|
|00002de0| 69 6e 64 20 6f 75 74 20 | 68 6f 77 20 6d 75 63 68 |ind out |how much|
|00002df0| 20 64 61 74 61 20 77 61 | 73 20 73 65 6e 74 2c 20 | data wa|s sent, |
|00002e00| 74 68 65 6e 20 75 73 65 | 20 63 72 65 61 74 65 20 |then use| create |
|00002e10| 61 20 6e 65 77 20 62 75 | 66 66 65 72 20 6c 61 72 |a new bu|ffer lar|
|00002e20| 67 65 20 65 6e 6f 75 67 | 68 20 74 6f 20 68 6f 6c |ge enoug|h to hol|
|00002e30| 64 0d 09 09 61 6c 6c 20 | 74 68 65 20 64 61 74 61 |d...all |the data|
|00002e40| 2c 20 74 68 65 6e 20 63 | 61 6c 6c 20 41 63 63 65 |, then c|all Acce|
|00002e50| 70 74 48 69 67 68 4c 65 | 76 65 6c 45 76 65 6e 74 |ptHighLe|velEvent|
|00002e60| 20 61 67 61 69 6e 20 74 | 6f 20 67 65 74 20 74 68 | again t|o get th|
|00002e70| 65 20 64 61 74 61 2e 0d | 09 2a 2f 0d 09 0d 09 69 |e data..|.*/....i|
|00002e80| 66 20 28 48 4c 45 76 65 | 6e 74 45 72 72 6f 72 20 |f (HLEve|ntError |
|00002e90| 3d 3d 20 62 75 66 66 65 | 72 49 73 53 6d 61 6c 6c |== buffe|rIsSmall|
|00002ea0| 29 20 7b 0d 09 09 64 61 | 74 61 42 75 66 66 65 72 |) {...da|taBuffer|
|00002eb0| 20 3d 20 4e 65 77 50 74 | 72 28 64 61 74 61 53 69 | = NewPt|r(dataSi|
|00002ec0| 7a 65 29 3b 0d 09 09 48 | 4c 45 76 65 6e 74 45 72 |ze);...H|LEventEr|
|00002ed0| 72 6f 72 20 3d 20 41 63 | 63 65 70 74 48 69 67 68 |ror = Ac|ceptHigh|
|00002ee0| 4c 65 76 65 6c 45 76 65 | 6e 74 28 26 65 76 65 6e |LevelEve|nt(&even|
|00002ef0| 74 53 65 6e 64 65 72 49 | 6e 66 6f 2c 20 26 65 76 |tSenderI|nfo, &ev|
|00002f00| 65 6e 74 49 64 65 6e 74 | 69 66 69 65 72 2c 20 64 |entIdent|ifier, d|
|00002f10| 61 74 61 42 75 66 66 65 | 72 2c 20 26 64 61 74 61 |ataBuffe|r, &data|
|00002f20| 53 69 7a 65 29 3b 0d 09 | 7d 0d 09 09 0d 09 2f 2a |Size);..|}...../*|
|00002f30| 09 44 69 73 70 61 74 63 | 68 20 74 68 65 20 68 69 |.Dispatc|h the hi|
|00002f40| 67 68 20 6c 65 76 65 6c | 20 65 76 65 6e 74 20 74 |gh level| event t|
|00002f50| 6f 20 74 68 65 20 70 72 | 6f 70 65 72 20 72 6f 75 |o the pr|oper rou|
|00002f60| 74 69 6e 65 20 64 65 70 | 65 6e 64 69 6e 67 20 6f |tine dep|ending o|
|00002f70| 6e 20 74 68 65 20 6d 65 | 73 73 61 67 65 20 63 6c |n the me|ssage cl|
|00002f80| 61 73 73 20 2a 2f 0d 09 | 0d 09 73 77 69 74 63 68 |ass */..|..switch|
|00002f90| 09 28 65 76 65 6e 74 2d | 3e 6d 65 73 73 61 67 65 |.(event-|>message|
|00002fa0| 29 20 7b 0d 09 7d 0d 09 | 0d 09 69 66 20 28 64 61 |) {..}..|..if (da|
|00002fb0| 74 61 42 75 66 66 65 72 | 29 0d 09 09 44 69 73 70 |taBuffer|)...Disp|
|00002fc0| 6f 73 50 74 72 28 64 61 | 74 61 42 75 66 66 65 72 |osPtr(da|taBuffer|
|00002fd0| 29 3b 0d 7d 0d 00 00 00 | 00 00 00 00 00 00 00 00 |);.}....|........|
|00002fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003000| 00 00 01 00 00 00 01 76 | 00 00 00 76 00 00 00 52 |.......v|...v...R|
|00003010| 22 5e 22 00 42 61 64 20 | 4f 62 6a 65 63 74 20 66 |"^".Bad |Object f|
|00003020| 69 6c 65 3a 20 70 61 72 | 65 6e 74 20 49 44 20 72 |ile: par|ent ID r|
|00003030| 0e 65 76 65 6e 74 48 61 | 6e 64 6c 65 72 2e 63 65 |.eventHa|ndler.ce|
|00003040| 02 00 00 00 54 45 58 54 | 4d 4d 43 43 01 00 ff ff |....TEXT|MMCC....|
|00003050| 00 00 54 45 58 54 4d 4d | 43 43 01 00 ff ff ff ff |..TEXTMM|CC......|
|00003060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003070| 00 00 a1 ef a9 ae 00 00 | 2f 55 00 00 01 c8 6b 20 |........|/U....k |
|00003080| 73 70 61 63 65 20 6f 72 | 20 72 65 6f 72 67 61 6e |space or| reorgan|
|00003090| 69 7a 65 20 72 65 66 65 | 72 65 6e 63 65 73 2e 00 |ize refe|rences..|
|000030a0| 4e 6f 20 44 69 63 74 69 | 6f 6e 61 72 79 20 45 6e |No Dicti|onary En|
|000030b0| 74 72 79 20 66 6f 75 6e | 64 20 66 6f 72 20 4c 6f |try foun|d for Lo|
|000030c0| 63 61 6c 20 49 44 00 4c | 6f 63 61 6c 20 49 44 20 |cal ID.L|ocal ID |
|000030d0| 68 61 73 20 70 72 65 76 | 69 6f 75 73 2c 20 63 6f |has prev|ious, co|
|000030e0| 6e 66 6c 69 63 74 69 6e | 67 2c 20 74 79 70 65 00 |nflictin|g, type.|
|000030f0| 4f 75 74 20 6f 66 20 6d | 65 6d 6f 72 79 20 28 68 |Out of m|emory (h|
|00003100| 00 00 00 1e 00 78 00 18 | 01 dd 02 3d 00 78 00 18 |.....x..|...=.x..|
|00003110| 01 dd 02 3d 00 00 00 00 | 00 00 00 00 00 00 00 00 |...=....|........|
|00003120| 00 00 00 00 00 48 00 0a | 43 6f 75 72 69 65 72 00 |.....H..|Courier.|
|00003130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003140| 00 00 00 00 00 00 00 00 | 00 03 00 04 00 3b 00 1c |........|.....;..|
|00003150| 01 c3 02 5d 00 3b 00 1c | 01 c3 02 5d ac 30 3e f8 |...].;..|...].0>.|
|00003160| 00 00 1c a4 00 00 1c ae | 00 00 1b 5e 01 00 00 00 |........|...^....|
|00003170| 00 04 00 01 00 01 00 00 | 01 00 00 00 01 76 00 00 |........|.....v..|
|00003180| 00 76 00 00 00 52 00 5f | bb 88 2c ce 00 00 00 1c |.v...R._|..,.....|
|00003190| 00 52 00 01 4d 50 53 52 | 00 01 00 12 4d 57 42 42 |.R..MPSR|....MWBB|
|000031a0| 00 00 00 2a 03 f0 ff ff | 00 00 00 00 00 00 00 00 |...*....|........|
|000031b0| 03 ed ff ff 00 00 00 22 | 00 00 00 00 03 f0 ff ff |......."|........|
|000031c0| 00 00 00 6e 00 00 00 00 | 00 00 00 00 00 00 00 00 |...n....|........|
|000031d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000031e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000031f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+